ifcpatch.recipes.ConvertPropertiesToQuantities#

Module Contents#

class ifcpatch.recipes.ConvertPropertiesToQuantities.Patcher(src, file, logger, property_name=None, quantity_name=None)#

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 (str) – The name of the property to convert into a quantity. The name of the property set is not considered.

  • quantity_name (str) – 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(self, ifc_class)#
get_qto_templates(self, ifc_class)#
patch(self)#
process_product(self, product, definitions)#