That is just 3 lines of code, but it will be better to continue as is for testing purposes - so please let's just finish this first, I can then convert it for pure-aircraft use later on, should just take 20 seconds ... the dialog is a good thing for development purposes - and whatever you do in the Nasal console is NOT specific to the GUI dialog.
You can find an example for doing this in the c172p-canvas or the HUD - but I'd really prefer if we could proceed for now using the GUI dialog and the Nasal console, while using the wiki to post screen shots and updates/code snippets there.
After all, this is also supposed to be aircraft agnostic and useful elsewhere.
Now, what you CAN do already, would be using a Canvas without the dialog, and simply opening a dialog with a placement instead of doing the opposite.
See: http://wiki.flightgear.org/Howto:Add_a_ ... e_a_Canvas
But in the long-term, I would prefer turning this into a Nasal class that can manage multiple Canvases per aircraft, so that we can also re-implement the existing livery system accordingly, so that it stops interfering with canvas. Which would also mean that people can reuse the same class for placing bullet holes or doing other fancy things (e.g. immatriculation)
EDIT: I've edited your wiki code to demonstrate how to detach the canvas from the window, allocate it without a window, and then use a canvas placement to show the aircraft canvas. It's still untested, so you may need to fiddle a bit with it....