mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Fix #4756. You can now use parent as a key in a selector key.
This commit is contained in:
@@ -370,6 +370,8 @@ def set_element_value(
|
||||
element = ifcopenshell.util.element.get_container(element, ifc_class="IfcBuilding")
|
||||
elif key == "site":
|
||||
element = ifcopenshell.util.element.get_container(element, ifc_class="IfcSite")
|
||||
elif key == "parent":
|
||||
element = ifcopenshell.util.element.get_parent(element)
|
||||
elif key == "class":
|
||||
if element.is_a().lower() != value.lower():
|
||||
return ifcopenshell.util.schema.reassign_class(ifc_file, element, value)
|
||||
|
||||
Reference in New Issue
Block a user