Sorry for asking off-topic: Is there a straightforward way to use the macro editor within python?
I don't know if you need more but there is already a generic open function that will open a Python editor when opening a py file or script.However the code that opens it is fairly simple (src/Gui/DlgMacroExecuteImp.cpp, L289), one could easily add some FreeCADGui.openMacroEditor(filepath) function. @ma42kus if that is useful to you, tell me and I'll add it. But that would add maybe a lot of hassle, you'll need to save your text to a temp file, then watch that file for changes... It might be easier to stick to your current way.
Code: Select all