From 92ba412c956d1701ccb8acf5e59baa302c402173 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sat, 6 Feb 2021 15:24:53 +1100 Subject: [PATCH] Fix bug where add grids didn't work. See #1284. --- src/ifcblenderexport/blenderbim/bim/svgwriter.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ifcblenderexport/blenderbim/bim/svgwriter.py b/src/ifcblenderexport/blenderbim/bim/svgwriter.py index 1d8968397e..3006ac3d98 100644 --- a/src/ifcblenderexport/blenderbim/bim/svgwriter.py +++ b/src/ifcblenderexport/blenderbim/bim/svgwriter.py @@ -10,6 +10,7 @@ from . import annotation from . import helper from mathutils import Vector from mathutils import geometry +from blenderbim.bim.ifc import IfcStore try: from OCC.Core import BRep, BRepTools, TopExp, TopAbs @@ -140,11 +141,7 @@ class SvgWriter: line["marker-start"] = "url(#grid-marker)" line["marker-end"] = "url(#grid-marker)" line["stroke-dasharray"] = "12.5, 3, 3, 3" - axis_tag = grid_obj.BIMObjectProperties.attributes.get("AxisTag") - if axis_tag: - axis_tag = axis_tag.string_value - else: - axis_tag = grid_obj.name.split("/")[1] + axis_tag = IfcStore.get_file().by_id(grid_obj.BIMObjectProperties.ifc_definition_id).AxisTag self.svg.add( self.svg.text( axis_tag,