ifcpatch.recipes.ConvertPropertiesToQuantities
¶
Module Contents¶
- class ifcpatch.recipes.ConvertPropertiesToQuantities.Patcher(src: str, file: ifcopenshell.file, logger: logging.Logger, property_name: str, quantity_name: str)¶
Converts a property to a standardised quantity
IFC can store arbitrary key value metadata associated with a elements known as properties and quantities. The difference between the two is that quantities specifically measure physical dimensions, and can be used parametrically. A collection of standardised quantities have also been published by buildingSMART. Using standardised quantities can help automate BIM workflows, instead of arbitrary properties.
Sometimes, proprietary BIM software incorrectly stores quantities and properties. This patch lets you convert these incorrect properties to standardised quantities instead.
The existing property will not be removed.
- Parameters:
property_name – The name of the property to convert into a quantity. The name of the property set is not considered.
quantity_name – The name of the quantity that this property should be stored in. This should be a standard name that is one of the quantity names of a buildingSMART quantity template. For example, it may be “NetSideArea” for walls, which exists in Qto_WallBaseQuantities. The quantity set name will be based on the standard buildingSMART quantity template.
Example:
# Any property named "Area" is converted to a quantity named # "NetSideArea", if that standardised quantity exists. ifcpatch.execute({"input": "input.ifc", "file": model, "recipe": "ConvertPropertiesToQuantities", "arguments": ["Area", "NetSideArea"]})
- get_qto_name(ifc_class: str) str | None ¶
- get_qto_templates(ifc_class: str) list[ifcopenshell.entity_instance] ¶
- patch() None ¶
- process_product(product: ifcopenshell.entity_instance, definitions: list[ifcopenshell.entity_instance]) None ¶
- destination_quantity_name¶
- file¶
- logger¶
- source_property_name¶
- src¶