ifcopenshell.api.drawing.unassign_product
¶
Module Contents¶
- ifcopenshell.api.drawing.unassign_product.unassign_product(file: ifcopenshell.file, relating_product: ifcopenshell.entity_instance, related_object: ifcopenshell.entity_instance) None ¶
Unassigns a product and an object (typically an annotation)
Smart annotation objects can be associated with products so that they can annotate attributes and properties. This function lets you remove the association, so that you may change the assocation with another object later or leave the annotation as a “dumb” annotation.
- Parameters:
relating_product (ifcopenshell.entity_instance) – The IfcProduct the object is related to
related_object (ifcopenshell.entity_instance) – The object (typically IfcAnnotation) that the product is related to
- Returns:
None
- Return type:
None
Example:
furniture = ifcopenshell.api.root.create_entity(model, ifc_class="IfcFurniture") annotation = ifcopenshell.api.root.create_entity(model, ifc_class="IfcAnnotation") ifcopenshell.api.drawing.assign_product(model, relating_product=furniture, related_object=annotation) # Let's change our mind and remove the relationship ifcopenshell.api.drawing.unassign_product(model, relating_product=furniture, related_object=annotation)