fix editing sheets in ifc2x3 #4576

This commit is contained in:
Andrej730
2024-04-25 11:12:46 +05:00
parent f1037de14d
commit 087d55f02a
2 changed files with 6 additions and 2 deletions
@@ -2404,7 +2404,7 @@ class EditSheet(bpy.types.Operator, Operator):
if sheet.is_a("IfcDocumentInformation"):
self.document_type = "SHEET"
self.name = sheet.Name
self.identification = sheet.Identification
self.identification = sheet.DocumentId if tool.Ifc.get_schema() == "IFC2X3" else sheet.Identification
elif sheet.is_a("IfcDocumentReference") and tool.Drawing.get_reference_description(sheet) == "TITLEBLOCK":
self.document_type = "TITLEBLOCK"
else:
+5 -1
View File
@@ -118,7 +118,11 @@ def remove_sheet(ifc, drawing, sheet=None):
def rename_sheet(ifc, drawing, sheet=None, identification=None, name=None):
ifc.run("document.edit_information", information=sheet, attributes={"Identification": identification, "Name": name})
if ifc.get_schema() == "IFC2X3":
attributes = {"DocumentId": identification, "Name": name}
else:
attributes = {"Identification": identification, "Name": name}
ifc.run("document.edit_information", information=sheet, attributes=attributes)
for reference in drawing.get_document_references(sheet):
description = drawing.get_reference_description(reference)
if description == "SHEET":