diff --git a/ExampleFiles/Parameters/0_Model/GsaList_Members.gh b/ExampleFiles/Parameters/0_Model/GsaList_Members.gh index 65e4c7c61..ad37b5fcb 100644 Binary files a/ExampleFiles/Parameters/0_Model/GsaList_Members.gh and b/ExampleFiles/Parameters/0_Model/GsaList_Members.gh differ diff --git a/ExampleFiles/Parameters/0_Model/GsaList_Properties.gh b/ExampleFiles/Parameters/0_Model/GsaList_Properties.gh index 5ba062323..1a8d3bba4 100644 Binary files a/ExampleFiles/Parameters/0_Model/GsaList_Properties.gh and b/ExampleFiles/Parameters/0_Model/GsaList_Properties.gh differ diff --git a/GsaGH/Helpers/Assembly/Model/Lists.cs b/GsaGH/Helpers/Assembly/Model/Lists.cs index 81b2977b1..1de5c70a3 100644 --- a/GsaGH/Helpers/Assembly/Model/Lists.cs +++ b/GsaGH/Helpers/Assembly/Model/Lists.cs @@ -309,9 +309,6 @@ private void ConvertList(List lists, GH_Component owner) { } private void ConvertList(GsaList list, GH_Component owner) { - if (list == null) { - return; - } GsaList copyList; switch (list.EntityType) { case EntityType.Element: diff --git a/GsaGH/Helpers/Assembly/Properties/Properties.cs b/GsaGH/Helpers/Assembly/Properties/Properties.cs index fa2bd6aa5..604b8d1ed 100644 --- a/GsaGH/Helpers/Assembly/Properties/Properties.cs +++ b/GsaGH/Helpers/Assembly/Properties/Properties.cs @@ -42,16 +42,16 @@ private static GsaGuidDictionary GetProp3dDictionary(GsaModel model) { } private string GetPropertyReferenceDefinition(Guid guid) { - if (_sections.GuidDictionary.TryGetValue(guid, out int steelId)) { - return "PB" + steelId; + if (_sections.GuidDictionary.TryGetValue(guid, out int sectionId)) { + return "PB" + sectionId; } - if (_prop2ds.GuidDictionary.TryGetValue(guid, out int concreteId)) { - return "PA" + concreteId; + if (_prop2ds.GuidDictionary.TryGetValue(guid, out int pro2dId)) { + return "PA" + pro2dId; } - if (_prop3ds.GuidDictionary.TryGetValue(guid, out int frpId)) { - return "PV" + frpId; + if (_prop3ds.GuidDictionary.TryGetValue(guid, out int prop3dId)) { + return "PV" + prop3dId; } return GetMaterialReferenceDefinition(guid); diff --git a/GsaGH/Helpers/GH/Inputs.cs b/GsaGH/Helpers/GH/Inputs.cs index 9ead9235f..16188cb4d 100644 --- a/GsaGH/Helpers/GH/Inputs.cs +++ b/GsaGH/Helpers/GH/Inputs.cs @@ -151,8 +151,8 @@ internal static List GetGooObjectsForLists( break; case GsaProperty3dGoo prop3dGoo: - list.Add(prop3dGoo); - break; + owner.AddRuntimeError($"Unable to reference 3D property in a Member list."); + continue; case GsaMember1dGoo member1dGoo: list.Add(member1dGoo); diff --git a/IntegrationTests/2_Parameters/0_Model/GsaList_Members_Test.cs b/IntegrationTests/2_Parameters/0_Model/GsaList_Members_Test.cs index 28605e01f..07478836a 100644 --- a/IntegrationTests/2_Parameters/0_Model/GsaList_Members_Test.cs +++ b/IntegrationTests/2_Parameters/0_Model/GsaList_Members_Test.cs @@ -15,6 +15,11 @@ public void NoRuntimeErrorTest() { Helper.TestNoRuntimeMessagesInDocument(Document, GH_RuntimeMessageLevel.Error); } + [Fact] + public void NoRuntimeWarningsTest() { + Helper.TestNoRuntimeMessagesInDocument(Document, GH_RuntimeMessageLevel.Warning, "Warning"); + } + [Theory] [InlineData("Test1Id", 1)] [InlineData("Test1Name", "Columns")] @@ -36,6 +41,10 @@ public void NoRuntimeErrorTest() { [InlineData("Test5Name", "Ground floor")] [InlineData("Test5Type", "Member")] [InlineData("Test5Count", 1)] + [InlineData("Test6Id", 99)] + [InlineData("Test6Name", "3d list")] + [InlineData("Test6Type", "Member")] + [InlineData("Test6Count", 1)] public void Test(string groupIdentifier, object expected) { IGH_Param param = Helper.FindParameter(Document, groupIdentifier); Helper.TestGhPrimitives(param, expected); diff --git a/IntegrationTests/2_Parameters/0_Model/GsaList_Properties_Test.cs b/IntegrationTests/2_Parameters/0_Model/GsaList_Properties_Test.cs index 9638c2a6b..44b94c079 100644 --- a/IntegrationTests/2_Parameters/0_Model/GsaList_Properties_Test.cs +++ b/IntegrationTests/2_Parameters/0_Model/GsaList_Properties_Test.cs @@ -12,7 +12,12 @@ public class GsaList_Properties_Test { [Fact] public void NoRuntimeErrorTest() { - Helper.TestNoRuntimeMessagesInDocument(Document, GH_RuntimeMessageLevel.Error); + Helper.TestNoRuntimeMessagesInDocument(Document, GH_RuntimeMessageLevel.Error, "Error"); + } + + [Fact] + public void NoRuntimeWarningsTest() { + Helper.TestNoRuntimeMessagesInDocument(Document, GH_RuntimeMessageLevel.Warning, "Warning"); } [Theory] @@ -47,6 +52,10 @@ public void NoRuntimeErrorTest() { [InlineData("Test10Name", "Slabs Material list")] [InlineData("Test10Type", "Element")] [InlineData("Test10Count", 6)] + [InlineData("Test11Id", 5)] + [InlineData("Test11Name", "E3d list")] + [InlineData("Test11Type", "Element")] + [InlineData("Test11Count", 1)] public void Test(string groupIdentifier, object expected) { IGH_Param param = Helper.FindParameter(Document, groupIdentifier); Helper.TestGhPrimitives(param, expected);