Hi
Newbie question, how do i add scripts to Qcad
Version:
3.23.0.0 (3.23.0)
I tried adding the script to this folder "C:\Program Files\QCAD\scripts\Misc\Examples" and added a folder called
Mytool with JS file and it doesn't showup when i start qcad? its and example file from "https://github.com/qcad/qcad/tree/maste ... mpleplugin"
Do I nead to do anything else? I followed the instructions but I must be doing something wrong??
Cheers
John
[Solved] How do i add a script to qcad
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Premier Member
- Posts: 474
- Joined: Mon Sep 30, 2019 6:21 am
- Location: Melbourne - Australia
[Solved] How do i add a script to qcad
Last edited by John Hyslop on Fri Oct 25, 2019 4:11 am, edited 1 time in total.
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]
Re: How do i add a script to qcad
Hi John,
The scripting rely for a bit on the actual folder structure.
Line 23 of the example points to "MiscMenu".
With line 21-22 it will take position 0 in group 0 there.
What you may have missed in the tutorials is:
MyTools.js has to sit in a folder called MyTools.
In this case the folder MyTools should reside under the folder Misc.
So you only have to move the MyTools folder to under the Misc folder and all will be ok.
Reboot Qcad after the move.
Reboot Qcad after altering any code.
Start Qcad with rescanning the scripts: "C:\Program Files\QCAD\qcad.exe" -rescan
(I think this is the same option as in App.Prefs / Scripting)
Start Qcad in debugger mode: "C:\Program Files\QCAD\qcad.exe" -enable-script-debugger
(To catch load or execution errors: !Not that stable!)
Start Qcad with reloading your scripts before execution: "C:\Program Files\QCAD\qcad.exe" -always-load-scripts
Or any combination.
Regards,
CVH
The scripting rely for a bit on the actual folder structure.
Line 23 of the example points to "MiscMenu".
With line 21-22 it will take position 0 in group 0 there.
What you may have missed in the tutorials is:
MyTools.js has to sit in a folder called MyTools.
In this case the folder MyTools should reside under the folder Misc.
So you only have to move the MyTools folder to under the Misc folder and all will be ok.
Reboot Qcad after the move.
Reboot Qcad after altering any code.
Start Qcad with rescanning the scripts: "C:\Program Files\QCAD\qcad.exe" -rescan
(I think this is the same option as in App.Prefs / Scripting)
Start Qcad in debugger mode: "C:\Program Files\QCAD\qcad.exe" -enable-script-debugger
(To catch load or execution errors: !Not that stable!)
Start Qcad with reloading your scripts before execution: "C:\Program Files\QCAD\qcad.exe" -always-load-scripts
Or any combination.
Regards,
CVH
-
- Premier Member
- Posts: 474
- Joined: Mon Sep 30, 2019 6:21 am
- Location: Melbourne - Australia
Re: How do i add a script to qcad
Hi CVH
It didn't work... the file points to Mytool folder not Mytools
so I tried both, I'm definately missing something here???
also ran CMD as administrator these commands as you said
and it didn't work? I can load libraries up ok and I've added a few
but having trouble with scripts
Could you send me a scipt that you know works so I can test it's not just a bodgy script?
It didn't work... the file points to Mytool folder not Mytools
so I tried both, I'm definately missing something here???
also ran CMD as administrator these commands as you said
and it didn't work? I can load libraries up ok and I've added a few
but having trouble with scripts
Could you send me a scipt that you know works so I can test it's not just a bodgy script?
- Attachments
-
- Qcad Menu.jpg (91.69 KiB) Viewed 5027 times
-
- Path to Mytool.jpg (13.23 KiB) Viewed 5027 times
-
- CMD.jpg (46.56 KiB) Viewed 5027 times
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]
Re: How do i add a script to qcad
Folder "MyTools"
with 'M' and 'T'
Does that solve something?
The start option of QCAD icon is:
"C:\Program Files\QCAD\qcad.exe"
The start option of QCAD DEBUG icon is:
"C:\Program Files\QCAD\qcad.exe" -rescan -enable-script-debugger -always-load-scripts
Hope this helped.
CVH
with 'M' and 'T'
Does that solve something?
The start option of QCAD icon is:
"C:\Program Files\QCAD\qcad.exe"
The start option of QCAD DEBUG icon is:
"C:\Program Files\QCAD\qcad.exe" -rescan -enable-script-debugger -always-load-scripts
Hope this helped.
CVH
-
- Premier Member
- Posts: 474
- Joined: Mon Sep 30, 2019 6:21 am
- Location: Melbourne - Australia
Re: How do i add a script to qcad
Hi CVH
YEAH you're a legend
thank you sooooo much
Cheers
John
YEAH you're a legend
thank you sooooo much
Cheers
John
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]
Re: How do i add a script to qcad
Glad I could help.
Would you care to add [Solved] to the first post.
Regards,
CVH
Would you care to add [Solved] to the first post.
Regards,
CVH