Add API documentation for document module

This commit is contained in:
Dion Moult
2022-11-23 10:56:12 +09:00
parent 09c8268494
commit b23f445946
8 changed files with 222 additions and 34 deletions
@@ -18,11 +18,24 @@
class Usecase:
def __init__(self, file, **settings):
def __init__(self, file, reference=None):
"""Remove a document reference
All associations with objects are removed.
:param reference: The IfcDocumentReference to remove
:type reference: ifcopenshell.entity_instance.entity_instance
:return: None
:rtype: None
Example::
document = ifcopenshell.api.run("document.add_information", model)
reference = ifcopenshell.api.run("document.add_reference", model, information=document)
ifcopenshell.api.run("document.remove_reference", model, reference=reference)
"""
self.file = file
self.settings = {"reference": None}
for key, value in settings.items():
self.settings[key] = value
self.settings = {"reference": reference}
def execute(self):
for rel in self.settings["reference"].DocumentRefForObjects or []: