mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 10:57:49 +00:00
Add documentation for pset API module
This commit is contained in:
@@ -18,11 +18,29 @@
|
||||
|
||||
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
def __init__(self, file, product=None, pset=None):
|
||||
"""Removes a property set from a product
|
||||
|
||||
All properties that are part of this property set are also removed.
|
||||
|
||||
:param product: The IfcObject to remove the property set from.
|
||||
:type product: ifcopenshell.entity_instance.entity_instance
|
||||
:param pset: The IfcPropertySet or IfcElementQuantity to remove.
|
||||
:type pset: ifcopenshell.entity_instance.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
Example::
|
||||
|
||||
# Let's imagine we have a new wall type with a property set.
|
||||
wall_type = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWallType")
|
||||
pset = ifcopenshell.api.run("pset.add_pset", model, product=wall_type, name="Pset_WallCommon")
|
||||
|
||||
# Remove it!
|
||||
ifcopenshell.api.run("pset.remove_pset", model, product=wall_type, pset=pset)
|
||||
"""
|
||||
self.file = file
|
||||
self.settings = {"product": None, "pset": None}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
self.settings = {"product": product, "pset": pset}
|
||||
|
||||
def execute(self):
|
||||
to_purge = []
|
||||
|
||||
Reference in New Issue
Block a user