Add API documentation for classification module

This commit is contained in:
Dion Moult
2022-11-15 16:11:47 +09:00
parent c87924c4ba
commit 308ee7f7a9
6 changed files with 232 additions and 29 deletions
@@ -18,11 +18,27 @@
class Usecase:
def __init__(self, file, **settings):
def __init__(self, file, classifcation=None):
"""Removes an IfcClassification from the project and all references
The classification and all of its relationships, children references,
and relationships between objectse and child references are completely
removed from a project.
:param classification: The IfcClassification entity you want to remove
:type classification: ifcopenshell.entity_instance.entity_instance
:return: None
:rtype: None
Example::
classification = model.by_type("IfcClassification")[0]
ifcopenshell.api.run("classification.remove_classification", model,
classification=classification)
"""
self.file = file
self.settings = {"classification": None}
for key, value in settings.items():
self.settings[key] = value
self.settings = {"classification": classification}
def execute(self):
references = self.get_references(self.settings["classification"])