mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
IfcTester now supports list and enumerated properties
This commit is contained in:
@@ -337,6 +337,10 @@ def get_property_unit(prop, ifc_file):
|
||||
measure_class = entity.attribute_by_index(3).type_of_attribute().declared_type().name()
|
||||
elif prop.is_a("IfcPropertySingleValue") and prop.NominalValue:
|
||||
measure_class = prop.NominalValue.is_a()
|
||||
elif prop.is_a("IfcPropertyEnumeratedValue") and prop.EnumerationValues:
|
||||
measure_class = prop.EnumerationValues[0].is_a()
|
||||
elif prop.is_a("IfcPropertyListValue") and prop.ListValues:
|
||||
measure_class = prop.ListValues[0].is_a()
|
||||
unit_type = get_measure_unit_type(measure_class)
|
||||
units = [u for u in unit_assignment.Units if getattr(u, "UnitType", None) == unit_type]
|
||||
if units:
|
||||
|
||||
Reference in New Issue
Block a user