ifcopenshell.api.type.unassign_type
¶
Module Contents¶
- ifcopenshell.api.type.unassign_type.unassign_type(file: ifcopenshell.file, related_objects: list[ifcopenshell.entity_instance]) None ¶
Unassigns a type from occurrences
Note that unassigning a type doesn’t automatically remove mapped representations and material usages associated with the previously assigned type.
- Parameters:
related_objects (list[ifcopenshell.entity_instance]) – List of IfcElement occurrences.
- 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.root.create_entity(model, ifc_class="IfcFurnitureType", name="FUN01") # An individual occurrence of a that sofa. furniture = ifcopenshell.api.root.create_entity(model, ifc_class="IfcFurniture") # Assign the furniture to the furniture type. ifcopenshell.api.type.assign_type(model, related_objects=[furniture], relating_type=furniture_type) # Change our mind. Maybe it's a different type? ifcopenshell.api.type.unassign_type(model, related_objects=[furniture])