mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
related to #7298 - skip material, as well.
This commit is contained in:
@@ -489,8 +489,8 @@ class IfcCsv:
|
|||||||
bool_false: str,
|
bool_false: str,
|
||||||
concat: str,
|
concat: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
# Read-only attributes that should be skipped during import
|
# Patterns to skip during import (substrings)
|
||||||
READ_ONLY_ATTRIBUTES = {'count'}
|
SKIP_PATTERNS = {'count', 'material'}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
element = ifc_file.by_guid(row[0])
|
element = ifc_file.by_guid(row[0])
|
||||||
@@ -510,8 +510,8 @@ class IfcCsv:
|
|||||||
value = False
|
value = False
|
||||||
key = attributes[i] or headers[i]
|
key = attributes[i] or headers[i]
|
||||||
|
|
||||||
# Skip read-only attributes
|
# Skip keys containing certain patterns
|
||||||
if key.lower() in READ_ONLY_ATTRIBUTES:
|
if any(pattern in key.lower() for pattern in SKIP_PATTERNS):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
ifcopenshell.util.selector.set_element_value(ifc_file, element, key, value, concat=concat)
|
ifcopenshell.util.selector.set_element_value(ifc_file, element, key, value, concat=concat)
|
||||||
|
|||||||
Reference in New Issue
Block a user