From be37e43376a1cd05521de06d13edd9d3d25e1ea4 Mon Sep 17 00:00:00 2001 From: Amritpal Singh Date: Mon, 23 Nov 2020 18:19:20 +0530 Subject: [PATCH] Fixed bug: Importing IFC in Console raises error because it linked with FreeeCADGui module. --- src/Mod/Arch/ArchCommands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchCommands.py b/src/Mod/Arch/ArchCommands.py index 2d3afdbdac..263f930a86 100644 --- a/src/Mod/Arch/ArchCommands.py +++ b/src/Mod/Arch/ArchCommands.py @@ -1202,8 +1202,9 @@ def cleanArchSplitter(objects=None): def rebuildArchShape(objects=None): """rebuildArchShape([objects]): takes the faces from the base shape of the given (or selected if objects is None) Arch objects, and tries to rebuild a valid solid from them.""" - import FreeCAD,FreeCADGui,Part - if not objects: + import FreeCAD,Part + if not objects and FreeCAD.GuiUp: + import FreeCADGui objects = FreeCADGui.Selection.getSelection() if not isinstance(objects,list): objects = [objects]