mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 05:14:30 +00:00
See #3411. Sheets are now sorted alphabetically by default.
This commit is contained in:
@@ -657,7 +657,7 @@ class Drawing(blenderbim.core.tool.Drawing):
|
|||||||
expanded_sheets = {s.ifc_definition_id for s in props.sheets if s.is_expanded}
|
expanded_sheets = {s.ifc_definition_id for s in props.sheets if s.is_expanded}
|
||||||
props.sheets.clear()
|
props.sheets.clear()
|
||||||
sheets = [d for d in tool.Ifc.get().by_type("IfcDocumentInformation") if d.Scope == "SHEET"]
|
sheets = [d for d in tool.Ifc.get().by_type("IfcDocumentInformation") if d.Scope == "SHEET"]
|
||||||
for sheet in sheets:
|
for sheet in sorted(sheets, key=lambda s: getattr(s, "Identification", getattr(s, "DocumentId", None))):
|
||||||
new = props.sheets.add()
|
new = props.sheets.add()
|
||||||
new.ifc_definition_id = sheet.id()
|
new.ifc_definition_id = sheet.id()
|
||||||
if tool.Ifc.get_schema() == "IFC2X3":
|
if tool.Ifc.get_schema() == "IFC2X3":
|
||||||
|
|||||||
Reference in New Issue
Block a user