Add docs to layer API

This commit is contained in:
Dion Moult
2022-12-07 08:59:24 +11:00
parent 45953c6b49
commit 9650bbb5ee
8 changed files with 149 additions and 28 deletions
@@ -18,11 +18,24 @@
class Usecase:
def __init__(self, file, **settings):
def __init__(self, file, layer=None):
"""Removes a layer
All representation items assigned to the layer will remain, but the
relationship to the layer will be removed.
:param layer: The IfcPresentationLayerAssignment entity to remove
:type layer: ifcopenshell.entity_instance.entity_instance
:return: None
:rtype: None
Example::
layer = ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL")
ifcopenshell.api.run("layer.remove_layer", model, layer=layer)
"""
self.file = file
self.settings = {"layer": None}
for key, value in settings.items():
self.settings[key] = value
self.settings = {"layer": layer}
def execute(self):
self.file.remove(self.settings["layer"])