Running QCAD Pro 3.27.6.0 on Win7 32 bit
So far I tested 2 methods:
Code: Select all
var action = RGuiAction.getByScriptFile("scripts/File/NewFile/NewFile.js");
if (!isNull(action)) {
action.slotTrigger();
}
else { // Without a new drawing
return; // Return to terminate in beginEvent
}
Code: Select all
include("scripts/File/NewFile/NewFile.js");
...
..
.
var mdiChild = NewFile.createMdiChild();
if (isNull(mdiChild)) { // Without a new drawing
return; // Return to terminate in beginEvent
}
A new GUI document is created, the focus shifts to the new document, output of the script does reach the new drawing.
The problem is that the 'Edit Block In-place' options toolbar turns visible. I traced it with debugging and it pops up at calling NewFile.setupDefaultAction(documentInterface);
To be clear, it pops up in both modes, normal and debugging.
It is not that of a big deal because it is rather spooky.
When I swap focus to another document or switch to another application it simply disappears.
But one can't use any of the options buttons because we are not editing in place nor do we use a block.
Every button will throw an exception on the Command History.
The drawing that is created is an early adaption of _myCone by tukuyomi.
https://www.qcad.org/rsforum/viewtopic. ... =30#p38464
Regards,
CVH