mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 13:46:54 +00:00
Fix #2881. Support added for referencing nested relationships and material set items.
This commit is contained in:
@@ -1042,9 +1042,10 @@ class Drawing(blenderbim.core.tool.Drawing):
|
||||
if not product:
|
||||
return text
|
||||
for variable in re.findall("{{.*?}}", text):
|
||||
text = text.replace(
|
||||
variable, str(ifcopenshell.util.selector.get_element_value(product, variable[2:-2]) or "")
|
||||
)
|
||||
value = ifcopenshell.util.selector.get_element_value(product, variable[2:-2])
|
||||
if isinstance(value, (list, tuple)):
|
||||
value = ", ".join(str(v) for v in value)
|
||||
text = text.replace(variable, str(value))
|
||||
return text
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user