Hi All,
Firstly thanks for your help.
I need to create a drawing but I suspect the locations, sizes, dimensions, existence of some of the drawing entities for this drawing instance will change.
I could draw it all in via the command line, but another way stuck me that might be more flexible.
Could I create a script which is sent to the command line which allows for variables to be initialised (eg size of rectangles and their locations) and these variables are then sent to the function call for the rectangle.
This way I can change the values for the variables if something changes and draw up the drawing based on a rerun of the script (rather than type everything in again).
I have looked at some existing posts on the scripting API and creation of Javascript (eg. the famous spiral) but I think what I'm after is slightly different ie. I don't need it to be part of a library as it is a very specifc drawing rather than an add-on module or part which is generic.
Can anyone point me in the right direction please?
Thanks
skipper
build and O/S info:
>>>>
Version: 3.9.1.0 (3.9.1)
Build Date: Mar 13 2015
Qt Version: 4.7.4
Compiler: MSVC++ 10.0 (2010)
O/S: windows 7 enterprise
>>>>>
create a parameterised drawing (script) off command line
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: create a parameterised drawing (script) off command line
The spiral script would be the right approach for this. Note that this script is not meant for the library browser but rather creates a menu to insert a spiral:
https://raw.githubusercontent.com/qcad/ ... hSpiral.js
Alternatively, you could load a drawing and modify it (for example using stretch, move, rotate, etc).
It depends a bit how much of the drawing is parametrized.
https://raw.githubusercontent.com/qcad/ ... hSpiral.js
Alternatively, you could load a drawing and modify it (for example using stretch, move, rotate, etc).
It depends a bit how much of the drawing is parametrized.