ifcopenshell.api.resource.edit_resource_quantity#

Module Contents#

class ifcopenshell.api.resource.edit_resource_quantity.Usecase(file, physical_quantity=None, attributes=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
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})
execute(self)#