From 1f1135418843df46e2f3c120d44a99d9d8c2a166 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Tue, 2 Aug 2022 19:30:37 +1000 Subject: [PATCH] Add support for adding non-library based classification references for IFC2X3 --- .../ifcopenshell/api/classification/add_reference.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py b/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py index 44083b94c3..b6d3f6deba 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py @@ -45,10 +45,12 @@ class Usecase: self.add_to_existing_relationship() else: reference = self.file.createIfcClassificationReference( - Identification=self.settings["identification"], - Name=self.settings["name"], - ReferencedSource=self.settings["classification"], + Name=self.settings["name"], ReferencedSource=self.settings["classification"] ) + if self.file.schema == "IFC2X3": + reference.ItemReference = self.settings["identification"] + else: + reference.Identification = self.settings["identification"] self.add_new_relationship(reference) return reference