ifcopenshell.api.document.unassign_document#

Module Contents#

class ifcopenshell.api.document.unassign_document.Usecase(file, product=None, document=None)#

Unassigns a document and a product association

Parameters
Returns

None

Return type

None

Example:

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

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

# Now let's change our mind and remove the association
ifcopenshell.api.run("document.unassign_document", model, product=storey, document=reference)
execute(self)#