MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / addModule

Method addModule

src/Gui/Command.cpp:833–849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

831}
832
833void Command::addModule(DoCmd_Type eType, const char* sModuleName)
834{
835 if (alreadyLoadedModule.find(sModuleName) == alreadyLoadedModule.end()) {
836 LogDisabler d1;
837 SelectionLogDisabler d2;
838 std::string sCmd("import ");
839 sCmd += sModuleName;
840 if (eType == Gui) {
841 Gui::Application::Instance->macroManager()->addLine(MacroManager::Gui, sCmd.c_str());
842 }
843 else {
844 Gui::Application::Instance->macroManager()->addLine(MacroManager::App, sCmd.c_str());
845 }
846 Base::Interpreter().runString(sCmd.c_str());
847 alreadyLoadedModule.insert(sModuleName);
848 }
849}
850
851std::string Command::_assureWorkbench(const char* file, int line, const char* sName)
852{

Callers 15

setupPythonTypesMethod · 0.45
ApplicationMethod · 0.45
initModuleFunction · 0.45
initModuleFunction · 0.45
initModuleFunction · 0.45
initModuleFunction · 0.45
initModuleFunction · 0.45
ActivatedMethod · 0.45
initModuleFunction · 0.45
initModuleFunction · 0.45
initModuleFunction · 0.45
ActivatedMethod · 0.45

Calls 7

macroManagerMethod · 0.80
runStringMethod · 0.80
findMethod · 0.45
endMethod · 0.45
addLineMethod · 0.45
c_strMethod · 0.45
insertMethod · 0.45

Tested by 3

initModuleFunction · 0.36
initModuleFunction · 0.36
initModuleFunction · 0.36