diff --git a/src/Mod/Fem/Gui/AppFemGui.cpp b/src/Mod/Fem/Gui/AppFemGui.cpp index 2ef2a55bf..1f02f79ed 100644 --- a/src/Mod/Fem/Gui/AppFemGui.cpp +++ b/src/Mod/Fem/Gui/AppFemGui.cpp @@ -75,26 +75,6 @@ void FemGuiExport initFemGui() return; } - try { - Base::Interpreter().loadModule("FemCommands"); - - Base::Interpreter().loadModule("_CommandMechanicalShowResult"); - Base::Interpreter().loadModule("_CommandQuickAnalysis"); - Base::Interpreter().loadModule("_CommandPurgeFemResults"); - Base::Interpreter().loadModule("_CommandMechanicalJobControl"); - Base::Interpreter().loadModule("_CommandFemFromShape"); - Base::Interpreter().loadModule("_CommandNewMechanicalAnalysis"); - - Base::Interpreter().loadModule("MechanicalAnalysis"); - Base::Interpreter().loadModule("MechanicalMaterial"); - Base::Interpreter().loadModule("FemBeamSection"); - Base::Interpreter().loadModule("FemShellThickness"); - } - catch (const Base::Exception& e) { - PyErr_SetString(PyExc_ImportError, e.what()); - return; - } - (void) Py_InitModule("FemGui", FemGui_Import_methods); /* mod name, table ptr */ Base::Console().Log("Loading GUI of Fem module... done\n"); diff --git a/src/Mod/Fem/InitGui.py b/src/Mod/Fem/InitGui.py index bb6339365..fe562c4b1 100755 --- a/src/Mod/Fem/InitGui.py +++ b/src/Mod/Fem/InitGui.py @@ -41,6 +41,19 @@ class FemWorkbench (Workbench): # load the module import Fem import FemGui + + import _CommandMechanicalShowResult + import _CommandQuickAnalysis + import _CommandPurgeFemResults + import _CommandMechanicalJobControl + import _CommandFemFromShape + import _CommandNewMechanicalAnalysis + + import MechanicalAnalysis + import MechanicalMaterial + import FemBeamSection + import FemShellThickness + import subprocess from platform import system ccx_path = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem").GetString("ccxBinaryPath")