mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
ConvertPropertiesToQuantities - ifc4x3 support
This commit is contained in:
@@ -67,7 +67,11 @@ class Patcher:
|
||||
|
||||
def patch(self) -> None:
|
||||
self.qto_template_cache: dict[str, list[ifcopenshell.entity_instance]] = {}
|
||||
self.psetqto = ifcopenshell.util.pset.get_template("IFC4")
|
||||
templates_schema = self.file.schema
|
||||
# No official qto templates in IFC2X3, fallback to IFC4.
|
||||
if templates_schema == "IFC2X3":
|
||||
templates_schema = "IFC4"
|
||||
self.psetqto = ifcopenshell.util.pset.get_template(templates_schema)
|
||||
|
||||
for product in self.file.by_type("IfcTypeProduct"):
|
||||
self.process_product(product, product.HasPropertySets or [])
|
||||
|
||||
Reference in New Issue
Block a user