Skip to content

Commit

Permalink
fix sheet regeneration missing drawing Identifier
Browse files Browse the repository at this point in the history
Was passing LAYOUT document reference to sheeter instead of
DRAWING document reference
  • Loading branch information
brunopostle committed Apr 24, 2024
1 parent f41fbf2 commit c0b4e09
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/blenderbim/blenderbim/tool/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,17 +251,16 @@ def create_svg_sheet(cls, document, titleblock):
def add_drawings(cls, sheet):
sheet_builder = sheeter.SheetBuilder()
sheet_builder.data_dir = bpy.context.scene.BIMProperties.data_dir
sheet_reference = None
drawing_references = {}
drawing_names = []
for reference in cls.get_document_references(sheet):
reference_description = cls.get_reference_description(reference)
if reference_description == "LAYOUT":
sheet_reference = reference
elif reference_description == "DRAWING":
if reference_description == "DRAWING":
drawing_references[Path(reference.Location).stem] = reference
drawing_names.append(Path(reference.Location).stem)
for annotation in [e for e in tool.Ifc.get().by_type("IfcAnnotation") if e.ObjectType == "DRAWING"]:
if annotation.Name in drawing_names:
sheet_builder.add_drawing(sheet_reference, annotation, sheet)
for drawing_annotation in [e for e in tool.Ifc.get().by_type("IfcAnnotation") if e.ObjectType == "DRAWING"]:
if drawing_annotation.Name in drawing_names:
sheet_builder.add_drawing(drawing_references[drawing_annotation.Name], drawing_annotation, sheet)

@classmethod
def delete_collection(cls, collection):
Expand Down

0 comments on commit c0b4e09

Please sign in to comment.