ifcopenshell.api.resource.edit_resource_quantity
¶
Module Contents¶
- ifcopenshell.api.resource.edit_resource_quantity.edit_resource_quantity(file, physical_quantity=None, attributes=None) None ¶
Edits the attributes of an IFC quantity
For more information about the attributes and data types of an IfC quantity, consult the IFC documentation.
- Parameters:
physical_quantity (ifcopenshell.entity_instance) – The IfC quantity entity you want to edit
attributes (dict, optional) – a dictionary of attribute names and values.
- Returns:
None
- Return type:
None
Example:
# Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") # Add some labour to our crew. labour = ifcopenshell.api.run("resource.add_resource", model, parent_resource=crew, ifc_class="IfcLaborResource") # Labour resource is quantified in terms of time. ifcopenshell.api.run("resource.add_resource_quantity", model, resource=labour, ifc_class="IfcQuantityTime") # Store the time used in hours ifcopenshell.api.run("resource.edit_resource_quantity", model, physical_quantity=time, attributes={"TimeValue": 8.0})