diff --git a/src/Mod/BIM/importers/exportIFC.py b/src/Mod/BIM/importers/exportIFC.py index d92466ad36..9e475fc6d1 100644 --- a/src/Mod/BIM/importers/exportIFC.py +++ b/src/Mod/BIM/importers/exportIFC.py @@ -308,9 +308,9 @@ def export(exportList, filename, colors=None, preferences=None): project = contextCreator.project objectslist = [obj for obj in objectslist if obj != contextCreator.project_object] - if Draft.getObjectsOfType(objectslist, "Site"): # we assume one site and one representation context only - decl = Draft.getObjectsOfType(objectslist, "Site")[0].Declination.getValueAs(FreeCAD.Units.Radian) - contextCreator.model_context.TrueNorth.DirectionRatios = (math.cos(decl+math.pi/2), math.sin(decl+math.pi/2)) + if Draft.getObjectsOfType(objectslist, "Site"): # we assume one site and one representation context only + decl = Draft.getObjectsOfType(objectslist, "Site")[0].Declination.getValueAs(FreeCAD.Units.Radian) + contextCreator.model_context.TrueNorth.DirectionRatios = (math.cos(decl+math.pi/2), math.sin(decl+math.pi/2)) # reusable entity system