diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/add_reference.py b/src/ifcopenshell-python/ifcopenshell/api/document/add_reference.py index 39cdb109d6..bcec5da606 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/document/add_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/document/add_reference.py @@ -69,10 +69,12 @@ class Usecase: def execute(self) -> ifcopenshell.entity_instance: if self.file.schema == "IFC2X3": - reference = self.file.create_entity("IfcDocumentReference") + reference = self.file.create_entity("IfcDocumentReference", ItemReference="X") if self.settings["information"]: references = list(self.settings["information"].DocumentReferences or []) references.append(reference) self.settings["information"].DocumentReferences = references return reference - return self.file.create_entity("IfcDocumentReference", ReferencedDocument=self.settings["information"]) + return self.file.create_entity( + "IfcDocumentReference", ReferencedDocument=self.settings["information"], Identification="X" + )