Hi,
is there a good scripting tutorial / book? The only thing i have is the sourcecode without any explanations of which code does what. In the QCAD book there is also nothing about scripting.
Thanks
Good scripting tutorial
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.
Re: Good scripting tutorial
Hi,
Yes but NO
All starts with javascript (Early version) or better ECMAScript
https://qcad.org/en/qcad-scripting
https://qcad.org/en/tutorial-script-programming
Many examples.
Scripts are mostly included in an installation in compiled form.
A fairly complete source apart from PRO scripts is github : https://github.com/qcad/qcad
What every script does is fairly self-explanatory.
I have a full download aside for reference.
It is not necessary to install them under QCAD (Rather counterproductive)
All the classes are documented here: https://www.qcad.org/doc/qcad/latest/de ... tated.html
Although that can be mince. After some months you get the hang of it.
The search button is my friend there.
Trial and error is a way.
NPP can search in all files in a folder, in all *.js, all *.ui or simply all.
Crawling through a copy of all masters with NPP reveals many methods.
Most questions get answered on the forum.
Regards,
CVH
Yes but NO
All starts with javascript (Early version) or better ECMAScript
https://qcad.org/en/qcad-scripting
https://qcad.org/en/tutorial-script-programming
Many examples.
Scripts are mostly included in an installation in compiled form.
A fairly complete source apart from PRO scripts is github : https://github.com/qcad/qcad
What every script does is fairly self-explanatory.
I have a full download aside for reference.
It is not necessary to install them under QCAD (Rather counterproductive)
All the classes are documented here: https://www.qcad.org/doc/qcad/latest/de ... tated.html
Although that can be mince. After some months you get the hang of it.
The search button is my friend there.
Trial and error is a way.
NPP can search in all files in a folder, in all *.js, all *.ui or simply all.
Crawling through a copy of all masters with NPP reveals many methods.
Most questions get answered on the forum.
Regards,
CVH
Re: Good scripting tutorial
Thanks. I knew all the sites you gave me before. The only thing i did not check was the classes (class list). I see that the event handlers are documented. Thats the most important thing.
By the way: I come from Java, C/C++, C#, PHP, JavaScript and i studied computer science. I did not have the impression that the scripts are self-explanatory. Some parts of it are, but others not.
By the way: I come from Java, C/C++, C#, PHP, JavaScript and i studied computer science. I did not have the impression that the scripts are self-explanatory. Some parts of it are, but others not.