ifcopenshell.api.type.unassign_type#

Module Contents#

class ifcopenshell.api.type.unassign_type.Usecase(file, related_object=None)#

Unassigns a type of an occurrence

Parameters

related_object (ifcopenshell.entity_instance.entity_instance) – The IfcElement occurrence.

Returns

None

Return type

None

Example:

# A furniture type. This would correlate to a particular model in a
# manufacturer's catalogue. Like an Ikea sofa :)
furniture_type = ifcopenshell.api.run("root.create_entity", model,
    ifc_class="IfcFurnitureType", name="FUN01")

# An individual occurrence of a that sofa.
furniture = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture")

# Assign the furniture to the furniture type.
ifcopenshell.api.run("type.assign_type", model, related_object=furniture, relating_type=furniture_type)

# Change our mind. Maybe it's a different type?
ifcopenshell.api.run("type.unassign_type", model, related_object=furniture)
execute(self)#