From 9c8313548c1f4fa6ee7ad58513ac2b45de054e39 Mon Sep 17 00:00:00 2001 From: kike-garbo Date: Fri, 20 Dec 2024 18:58:42 +0100 Subject: [PATCH] FromElementId --- .../Components/Structure/BoundaryConditionsSettings.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/RhinoInside.Revit.GH/Components/Structure/BoundaryConditionsSettings.cs b/src/RhinoInside.Revit.GH/Components/Structure/BoundaryConditionsSettings.cs index bec9e4989..4fe15d558 100644 --- a/src/RhinoInside.Revit.GH/Components/Structure/BoundaryConditionsSettings.cs +++ b/src/RhinoInside.Revit.GH/Components/Structure/BoundaryConditionsSettings.cs @@ -182,24 +182,21 @@ protected override void TrySolveInstance(IGH_DataAccess DA) StartTransaction(doc.Value); settings.BoundaryConditionFamilySymbolPinned = pinnedSymbol.Id; } - Params.TrySetData(DA, "Pinned", - () => doc.Value.GetElement(settings.BoundaryConditionFamilySymbolPinned) as ARDB.FamilySymbol); + Params.TrySetData(DA, _Pinned_, () => Types.FamilySymbol.FromElementId(doc.Value, settings.BoundaryConditionFamilySymbolPinned)); if (rollerSymbol is object) { StartTransaction(doc.Value); settings.BoundaryConditionFamilySymbolRoller = rollerSymbol.Id; } - Params.TrySetData(DA, "Roller", - () => doc.Value.GetElement(settings.BoundaryConditionFamilySymbolRoller) as ARDB.FamilySymbol); + Params.TrySetData(DA, _Roller_, () => Types.FamilySymbol.FromElementId(doc.Value, settings.BoundaryConditionFamilySymbolRoller)); if (userSymbol is object) { StartTransaction(doc.Value); settings.BoundaryConditionFamilySymbolUserDefined = userSymbol.Id; } - Params.TrySetData(DA, "User", - () => doc.Value.GetElement(settings.BoundaryConditionFamilySymbolUserDefined) as ARDB.FamilySymbol); + Params.TrySetData(DA, _User_, () => Types.FamilySymbol.FromElementId(doc.Value, settings.BoundaryConditionFamilySymbolUserDefined)); } } }