initial commit

-Added support for adding and editing enums
-changed behaviour of template psets that have enums.
This commit is contained in:
Vukas Pajic
2022-06-28 14:47:40 +02:00
committed by Dion Moult
parent 104cabfb67
commit c8c9262090
10 changed files with 227 additions and 47 deletions
@@ -80,6 +80,13 @@ def get_properties(properties):
for prop in properties or []:
if prop.is_a("IfcPropertySingleValue"):
results[prop.Name] = prop.NominalValue.wrappedValue if prop.NominalValue else None
for enum in prop.EnumerationValues:
values.append(enum.wrappedValue)
if values:
results[prop.Name] = str(values) if len(values)>1 else values[0]
else:
results[prop.Name] = 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)