Thank that will do.yorik wrote:Inside the python code, you can use FreeCADGui.doCommand() to print & execute code in the python window. If you search in Draft and Arch modules it is used everywhere. That command is defined IIRC in src/Gui/Applicationpy.cpp
But in the C++ code there are two methods, one for App commands and another for Gui commands. This is important because the macro recording stuff must be able to differentiate. So the first thing that must be done is implement a doGuiCommand() or something like that in C++, then use it in python code for Gui operations.
The transitions from cpp to python or reverse I can not yet oversee. Is it that _all_ missing docommand feature is due to the rather more complex issue of your second paragraph?
What is about for example with toggle Grid menu entry;does it points to cpp or to python code?