File Save and Restore in script plugin

This forum is for 'Work-in-Progress' QCAD user developed script Add Ons and Plug-ins.

Please use this forum to request/submit your script Add-Ons & Plug-in idea's.

Moderators: andrew, Husky, J-J

Post Reply
sandyg
Junior Member
Posts: 20
Joined: Thu Dec 12, 2019 10:49 pm

File Save and Restore in script plugin

Post by sandyg » Wed Feb 05, 2020 8:40 pm

Is it possible to pop a file save / open dialog in a plug in script? I'm pretty sure I have seen it in some of the examples but can't put my fingers on where I did. Basically want to save some data as JSON and restore later if needed but would like the user to be able to hit the scripts file save/open button and then catch the event of closing to grab file names for the JSON reader/writer.

This related to the crank trigger wheel plug in I did.

Examples always super helpful :P

Thanks
Sandy

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: File Save and Restore in script plugin

Post by CVH » Wed Feb 05, 2020 11:10 pm

You could look at BlockListExport.js
Filedialog and textstream
Not quit persistent folder handling

Regards,
CVH

Post Reply

Return to “QCAD 'Script Add-On & Plug-in challenge' - Work in Progress”