mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Write documentation for resource API module
This commit is contained in:
@@ -20,11 +20,19 @@ import ifcopenshell.api
|
||||
|
||||
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
def __init__(self, file, resource=None):
|
||||
"""Removes a resource and all relationships
|
||||
|
||||
Example::
|
||||
|
||||
# Add our own crew
|
||||
crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource")
|
||||
|
||||
# Fire our crew
|
||||
ifcopenshell.api.run("resource.remove_resource", model, resource=crew)
|
||||
"""
|
||||
self.file = file
|
||||
self.settings = {"resource": None}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
self.settings = {"resource": resource}
|
||||
|
||||
def execute(self):
|
||||
# TODO: review deep purge
|
||||
|
||||
Reference in New Issue
Block a user