Skip to content

Commit f3a7bf0

Browse files
DimitriosTheaothms
authored andcommitted
Update handling of entity_instance GlobalId Issue #18
1 parent 00e9f56 commit f3a7bf0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

mvd.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ def correct_for_export(all_data):
204204
d[k] = 0
205205

206206
elif isinstance(v, ifcopenshell.entity_instance):
207-
d[k] = v[0]
207+
if g := getattr(v, 'GlobalId', None):
208+
d[k] = g
209+
else:
210+
d[k] = str(v)
208211
return all_data
209212

210213

0 commit comments

Comments
 (0)