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:
Andrej730
2023-06-03 10:20:38 +05:00
parent 157d7d3c02
commit ce8379b8f7
3 changed files with 974 additions and 967 deletions
@@ -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__":