Spatial elements should check both class and name to prevent issue where two elements have the same name

This commit is contained in:
Dion Moult
2019-10-12 18:53:40 +11:00
parent 33bea4bf6c
commit 556766bf2b
@@ -689,7 +689,8 @@ class IfcParser():
return collection_tree
def get_spatial_structure_element_reference(self, name):
return [ e['attributes']['Name'] for e in self.spatial_structure_elements ].index(self.get_ifc_name(name))
return [ '{}/{}'.format(e['class'], e['attributes']['Name']) for e in
self.spatial_structure_elements ].index(name)
def get_type_product_reference(self, name):
return [ p['attributes']['Name'] for p in self.type_products ].index(self.get_ifc_name(name))