ifcopenshell.api.document.unassign_document

Module Contents

ifcopenshell.api.document.unassign_document.unassign_document(file: ifcopenshell.file, products: list[ifcopenshell.entity_instance], document: ifcopenshell.entity_instance) None

Unassigns a document and an association to the list of products

Parameters:
  • product (list[ifcopenshell.entity_instance]) – The list of objects that the document reference or information is related to.

  • document (ifcopenshell.entity_instance) – The IfcDocumentReference (typically) or in rare cases the IfcDocumentInformation that is associated with the product

Returns:

None

Return type:

None

Example:

document = ifcopenshell.api.document.add_information(model)
ifcopenshell.api.document.edit_information(model,
    information=document,
    attributes={"Identification": "A-GA-6100", "Name": "Overall Plan",
    "Location": "A-GA-6100 - Overall Plan.pdf"})
reference = ifcopenshell.api.document.add_reference(model, information=document)

# Let's imagine storey represents an IfcBuildingStorey for the ground floor
ifcopenshell.api.document.assign_document(model, products=[storey], document=reference)

# Now let's change our mind and remove the association
ifcopenshell.api.document.unassign_document(model, products=[storey], document=reference)