diff --git a/SpeckleStructuralGSA/ConversionRoutines/NodesAndElements/Structural1DElement.cs b/SpeckleStructuralGSA/ConversionRoutines/NodesAndElements/Structural1DElement.cs index eb4fd21..16b7853 100644 --- a/SpeckleStructuralGSA/ConversionRoutines/NodesAndElements/Structural1DElement.cs +++ b/SpeckleStructuralGSA/ConversionRoutines/NodesAndElements/Structural1DElement.cs @@ -41,7 +41,17 @@ public void ParseGWACommand(List nodes) obj.Name = pieces[counter++].Trim(new char[] { '"' }); counter++; // Colour counter++; // Type - obj.PropertyRef = Helper.GetApplicationId(typeof(GSA1DProperty).GetGSAKeyword(), Convert.ToInt32(pieces[counter++])); + var propRef = pieces[counter++]; + //Sometimes the property ref argument seems to have a relative length span attached to it: + //e.g. 1[0.245882:0.491765] where 1 is the actual property reference + var propRefNumerical = ""; + var index = 0; + while (char.IsDigit(propRef[index])) + { + propRefNumerical += propRef[index++]; + } + + obj.PropertyRef = Helper.GetApplicationId(typeof(GSA1DProperty).GetGSAKeyword(), Convert.ToInt32(propRefNumerical)); counter++; // Group obj.Value = new List(); @@ -546,6 +556,7 @@ public string SetGWACommand(int group = 0) } else { + ls.Add("YES"); ls.Add("MAN"); ls.Add("MAN"); try diff --git a/SpeckleStructuralGSA/ConversionRoutines/NodesAndElements/Structural1DElementPolyline.cs b/SpeckleStructuralGSA/ConversionRoutines/NodesAndElements/Structural1DElementPolyline.cs index 82acbd2..27a43a2 100644 --- a/SpeckleStructuralGSA/ConversionRoutines/NodesAndElements/Structural1DElementPolyline.cs +++ b/SpeckleStructuralGSA/ConversionRoutines/NodesAndElements/Structural1DElementPolyline.cs @@ -10,7 +10,7 @@ namespace SpeckleStructuralGSA { //TO DO: check why everything except GSA1DElement is needed as read prerequisites - [GSAObject("MEMB.8", new string[] { }, "elements", true, false, new Type[] { typeof(GSA1DElement), typeof(GSA1DLoadAnalysisLayer), typeof(GSA1DElementResult), typeof(GSAAssembly), typeof(GSAConstructionStage), typeof(GSA1DInfluenceEffect) }, new Type[] { typeof(GSA1DElement) })] + [GSAObject("MEMB.8", new string[] { }, "elements", true, true, new Type[] { typeof(GSA1DElement), typeof(GSA1DLoadAnalysisLayer), typeof(GSA1DElementResult), typeof(GSAAssembly), typeof(GSAConstructionStage), typeof(GSA1DInfluenceEffect) }, new Type[] { typeof(GSA1DElement) })] public class GSA1DElementPolyline : IGSASpeckleContainer { public int GSAId { get; set; }