mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 07:28:38 +00:00
Filter select entities in import_attributes
This commit is contained in:
@@ -53,7 +53,7 @@ def draw_attribute(attribute, layout, copy_operator=None):
|
|||||||
def import_attributes(ifc_class, props, data, callback=None):
|
def import_attributes(ifc_class, props, data, callback=None):
|
||||||
for attribute in IfcStore.get_schema().declaration_by_name(ifc_class).all_attributes():
|
for attribute in IfcStore.get_schema().declaration_by_name(ifc_class).all_attributes():
|
||||||
data_type = ifcopenshell.util.attribute.get_primitive_type(attribute)
|
data_type = ifcopenshell.util.attribute.get_primitive_type(attribute)
|
||||||
if isinstance(data_type, tuple) or data_type == "entity":
|
if isinstance(data_type, tuple) or data_type in ("entity", "select"):
|
||||||
callback(attribute.name(), None, data) if callback else None
|
callback(attribute.name(), None, data) if callback else None
|
||||||
continue
|
continue
|
||||||
new = props.add()
|
new = props.add()
|
||||||
|
|||||||
Reference in New Issue
Block a user