mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
Allow text annotation formatting functions
This commit is contained in:
@@ -219,7 +219,13 @@ class IfcCutter:
|
||||
for variable in text_obj.data.BIMTextProperties.variables:
|
||||
element = self.get_ifc_element(variable.global_id)
|
||||
if element:
|
||||
text_obj_data[variable.name] = self.ifc_attribute_extractor.get_element_key(element, variable.prop_key)
|
||||
if '{{' in variable.prop_key:
|
||||
prop_key = variable.prop_key.split('{{')[1].split('}}')[0]
|
||||
prop_value = self.ifc_attribute_extractor.get_element_key(element, prop_key)
|
||||
variable_value = eval(variable.prop_key.replace('{{' + prop_key + '}}', str(prop_value)))
|
||||
else:
|
||||
variable_value = self.ifc_attribute_extractor.get_element_key(element, variable.prop_key)
|
||||
text_obj_data[variable.name] = variable_value
|
||||
if text_obj_data:
|
||||
data[text_obj.name] = text_obj_data
|
||||
|
||||
|
||||
@@ -939,7 +939,6 @@ class IfcImporter():
|
||||
and getattr(association.RelatingDocument, value):
|
||||
setattr(reference, key, getattr(association.RelatingDocument, value))
|
||||
|
||||
|
||||
def place_objects_in_spatial_tree(self):
|
||||
for global_id, obj in self.added_data.items():
|
||||
self.place_object_in_spatial_tree(self.file.by_guid(global_id), obj)
|
||||
|
||||
Reference in New Issue
Block a user