handle ifc2x3 and 4

handles .ItemReference or .Identification
This commit is contained in:
ArturTomczak
2021-06-19 11:44:33 +02:00
parent 5b94043cdc
commit 3b270a61df
+4 -2
View File
@@ -110,8 +110,10 @@ class classification(facet):
for association in inst.HasAssociations:
if association.is_a("IfcRelAssociatesClassification"):
cref = association.RelatingClassification
refs.append((cref.ReferencedSource.Name, cref.Identification)) # before was .ItemReference instead of .Identification
if hasattr(cref, 'ItemReference'): #IFC2x3
refs.append((cref.ReferencedSource.Name, cref.ItemReference))
elif hasattr(cref, 'Identification'): # IFC4
refs.append((cref.ReferencedSource.Name, cref.Identification))
if refs:
return facet_evaluation(
(self.system, self.value) in refs,