mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Add support for connecting/disconnecting paths in API
This commit is contained in:
@@ -398,8 +398,7 @@ def get_parts(element):
|
||||
def replace_attribute(element, old, new):
|
||||
for i, attribute in enumerate(element):
|
||||
if has_element_reference(attribute, old):
|
||||
new_attribute = element.walk(lambda v: v == old, lambda v: new, attribute)
|
||||
element[i] = new_attribute
|
||||
element[i] = element.walk(lambda v: v == old, lambda v: new, attribute)
|
||||
|
||||
|
||||
def has_element_reference(value, element):
|
||||
|
||||
Reference in New Issue
Block a user