mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
IfcTester now supports list and enumerated properties
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user