ifcopenshell.api.pset_template.remove_prop_template#

Module Contents#

class ifcopenshell.api.pset_template.remove_prop_template.Usecase(file, prop_template=None)#

Removes a property template

Note that a property set template should always have at least one property template to be valid, so take care when removing property templates.

Parameters

prop_template (ifcopenshell.entity_instance.entity_instance) – The IfcSimplePropertyTemplate to remove.

Returns

None

Return type

None

Example:

template = ifcopenshell.api.run("pset_template.add_pset_template", model, name="ABC_RiskFactors")

# Here's two propertes with just default values.
prop1 = ifcopenshell.api.run("pset_template.add_prop_template", model, pset_template=template)
prop2 = ifcopenshell.api.run("pset_template.add_prop_template", model, pset_template=template)

# Let's remove the second one.
ifcopenshell.api.run("pset_template.remove_prop_template", model, prop_template=prop2)
execute(self)#