... use polyline in a for... loop in a script?

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
chattermark
Junior Member
Posts: 24
Joined: Sun Oct 12, 2014 8:30 am

... use polyline in a for... loop in a script?

Post by chattermark » Wed Jun 05, 2019 10:05 pm

Simple task, I thought. A script that draws a spiral with some individual parameters (as an exercise).
What would the nomenclature be like, how do I combine the for loop and the resulting single points with the other parameters (start, closed etc.)?

The for.. - loop within the polyline parameter set, or how?

I tried to find out something from the inherent spiral script, but did not find any example source for it, nor for any other usable script (except draw 0,0,100,100)- How should I proceed?

A practical example would probably help not only me.

Thanks, cheers,

Chattermark aka Ulli
Don't try to fix it if it ain't broken.

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: ... use polyline in a for... loop in a script?

Post by andrew » Wed Jun 05, 2019 10:13 pm

First, please refer to our scripting tutorials (with examples):
https://qcad.org/en/tutorial-script-programming

If this does not answer your question, there are plenty more examples at:
https://github.com/qcad/qcad/tree/master/scripts

Start with those in https://github.com/qcad/qcad/tree/maste ... c/Examples.

For example the spiral example script at:
https://github.com/qcad/qcad/tree/maste ... MathSpiral

chattermark
Junior Member
Posts: 24
Joined: Sun Oct 12, 2014 8:30 am

Re: ... use polyline in a for... loop in a script?

Post by chattermark » Thu Jun 06, 2019 6:10 am

Thanks. Exactly the pointers to what I needed. Something for the FAQ?

Cheers,
U.
Don't try to fix it if it ain't broken.

Post Reply

Return to “QCAD 'How Do I' Questions”