IfcTester now supports list and enumerated properties

This commit is contained in:
Dion Moult
2022-09-12 21:34:06 +10:00
parent 73ac5d314b
commit c7c59d9496
4 changed files with 76 additions and 11 deletions
@@ -95,9 +95,9 @@ def get_properties(properties):
if prop.is_a("IfcPropertySingleValue"):
results[prop.Name] = prop.NominalValue.wrappedValue if prop.NominalValue else None
elif prop.is_a("IfcPropertyEnumeratedValue"):
values = [v.wrappedValue for v in prop.EnumerationValues]
results[prop.Name] = [v.wrappedValue for v in prop.EnumerationValues] or None
elif prop.is_a("IfcPropertyListValue"):
results[prop.Name] = [v.wrappedValue for v in prop.ListValues] or None
elif prop.is_a("IfcComplexProperty"):
data = {k: v for k, v in prop.get_info().items() if v is not None and k != "Name"}
data["properties"] = get_properties(prop.HasProperties)