mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 06:32:09 +00:00
fix editing sheets in ifc2x3 #4576
This commit is contained in:
@@ -2404,7 +2404,7 @@ class EditSheet(bpy.types.Operator, Operator):
|
|||||||
if sheet.is_a("IfcDocumentInformation"):
|
if sheet.is_a("IfcDocumentInformation"):
|
||||||
self.document_type = "SHEET"
|
self.document_type = "SHEET"
|
||||||
self.name = sheet.Name
|
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":
|
elif sheet.is_a("IfcDocumentReference") and tool.Drawing.get_reference_description(sheet) == "TITLEBLOCK":
|
||||||
self.document_type = "TITLEBLOCK"
|
self.document_type = "TITLEBLOCK"
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -118,7 +118,11 @@ def remove_sheet(ifc, drawing, sheet=None):
|
|||||||
|
|
||||||
|
|
||||||
def rename_sheet(ifc, drawing, sheet=None, identification=None, name=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):
|
for reference in drawing.get_document_references(sheet):
|
||||||
description = drawing.get_reference_description(reference)
|
description = drawing.get_reference_description(reference)
|
||||||
if description == "SHEET":
|
if description == "SHEET":
|
||||||
|
|||||||
Reference in New Issue
Block a user