mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 09:08:40 +00:00
handle ifc2x3 and 4
handles .ItemReference or .Identification
This commit is contained in:
@@ -110,8 +110,10 @@ class classification(facet):
|
|||||||
for association in inst.HasAssociations:
|
for association in inst.HasAssociations:
|
||||||
if association.is_a("IfcRelAssociatesClassification"):
|
if association.is_a("IfcRelAssociatesClassification"):
|
||||||
cref = association.RelatingClassification
|
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:
|
if refs:
|
||||||
return facet_evaluation(
|
return facet_evaluation(
|
||||||
(self.system, self.value) in refs,
|
(self.system, self.value) in refs,
|
||||||
|
|||||||
Reference in New Issue
Block a user