mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 03:14:23 +00:00
Fixed missing PrimaryMeasureType for P_LISTVALUE in pset templates #3236
For some reason there is also was missing PrimaryUnit in IFC2X3. But it's unrelated to the changes from this commit (generating pset templates before this commit already has PrimaryUnit there).
This commit is contained in:
@@ -275,7 +275,14 @@ class PsetTemplatesGenerator:
|
||||
print("WARNING. Wasn't able to find units {unit_type} in schema.")
|
||||
pset_property.PrimaryUnit = unit_entity
|
||||
|
||||
pset_property.PrimaryMeasureType = property_type_xml.find(property_type_node).get(property_type_parse)
|
||||
type_xml = property_type_xml.find(property_type_node)
|
||||
if property_type_node == "ListValue":
|
||||
# for ListValue data type is contained in a single <DataType>
|
||||
primary_measure_type = type_xml.find('DataType').get(property_type_parse)
|
||||
else:
|
||||
primary_measure_type = type_xml.get(property_type_parse)
|
||||
|
||||
pset_property.PrimaryMeasureType = primary_measure_type
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user