QCAD 3.28.2 pro windows10
I'm learning to debug the ExSetColor.js script using .\qcadcmd.com -enable-script-debugger -autostart .\scripts\Misc\Examples\CommandLineExamples\ExSetColor\ExSetColor.js D:\software\QCAD3.28License-20231026\qcad -3.28.2-pro-win64-2\qcad-3.28.2-pro-win64\scripts\Misc\Examples\CommandLineExamples\ExSetColor\test.dxf D:\test1.dxf prompt Warning: RScriptHandlerEcma::eval: script engine exception: "ReferenceError: Can't find variable: getOpt"
I searched the API documentation to no avail and couldn't find the getOpt definition.
ExSetColor.js script issue
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Re: ExSetColor.js script issue
You are correct, I think this is deprecated.WildWolfCJ wrote: ↑Tue Nov 14, 2023 3:57 amI searched the API documentation to no avail and couldn't find the getOpt() definition.
(Commented out in RScriptHandlerEcma.srcml)
Other (active) Command Line tools include scripts/Tools/arguments.js to handle command line arguments.
Over to Andrew.
Regards,
CVH
Re: ExSetColor.js script issue
On Nov 19, 2023 Andrew ported ExSetColor.js to use arguments.js
This fix is not immediate and is most likely included in upcoming releases.
For evaluating this example script meanwhile you may want to source it directly from GitHub:
https://github.com/qcad/qcad/blob/maste ... etColor.js
Regards,
CVH
This fix is not immediate and is most likely included in upcoming releases.
For evaluating this example script meanwhile you may want to source it directly from GitHub:
https://github.com/qcad/qcad/blob/maste ... etColor.js
Regards,
CVH