mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
Write docs for owner API module
This commit is contained in:
@@ -18,11 +18,28 @@
|
||||
|
||||
|
||||
class Usecase:
|
||||
def __init__(self, file, **settings):
|
||||
def __init__(self, file, address=None):
|
||||
"""Removes an address
|
||||
|
||||
Naturally, any organisations or people using that address will have the
|
||||
relationship removed.
|
||||
|
||||
:param address: The IfcAddress to remove.
|
||||
:type address: ifcopenshell.entity_instance.entity_instance
|
||||
:return: None
|
||||
:rtype: None
|
||||
|
||||
Example::
|
||||
|
||||
organisation = ifcopenshell.api.run("owner.add_organisation", model)
|
||||
address = ifcopenshell.api.run("owner.add_address", model,
|
||||
assigned_object=organisation, ifc_class="IfcPostalAddress")
|
||||
|
||||
# Change our mind and delete it
|
||||
ifcopenshell.api.run("owner.remove_address", model, address=address)
|
||||
"""
|
||||
self.file = file
|
||||
self.settings = {"address": None}
|
||||
for key, value in settings.items():
|
||||
self.settings[key] = value
|
||||
self.settings = {"address": address}
|
||||
|
||||
def execute(self):
|
||||
for inverse in self.file.get_inverse(self.settings["address"]):
|
||||
|
||||
Reference in New Issue
Block a user