From 54808db670ccf2f746fe85df0b126a518417e2b5 Mon Sep 17 00:00:00 2001 From: oguzhankoral Date: Fri, 15 Nov 2024 06:14:25 +0300 Subject: [PATCH] Attach parent applicationId to meshes - seems like TSM.Solid object doesn't have any Identifier --- .../ToSpeckle/TopLevel/ModelObjectToSpeckleConverter.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Converters/Tekla/Speckle.Converters.TeklaShared/ToSpeckle/TopLevel/ModelObjectToSpeckleConverter.cs b/Converters/Tekla/Speckle.Converters.TeklaShared/ToSpeckle/TopLevel/ModelObjectToSpeckleConverter.cs index 27aa6ce38..90433fe31 100644 --- a/Converters/Tekla/Speckle.Converters.TeklaShared/ToSpeckle/TopLevel/ModelObjectToSpeckleConverter.cs +++ b/Converters/Tekla/Speckle.Converters.TeklaShared/ToSpeckle/TopLevel/ModelObjectToSpeckleConverter.cs @@ -58,6 +58,12 @@ public Base Convert(object target) var displayValue = _displayValueExtractor.GetDisplayValue(modelObject).ToList(); if (displayValue.Count > 0) { + foreach (var displayValueObject in displayValue) + { + // NOTE: since we put ModelObject applicationIds into proxies, we should also mutate the same application id for its displayValue objects. + // otherwise we will have anonymous objects on receive for other host apps + displayValueObject.applicationId = modelObject.GetSpeckleApplicationId(); + } result["displayValue"] = displayValue; }