How can i set the width of line?

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
liguosheng
Active Member
Posts: 33
Joined: Thu Jan 14, 2016 4:17 am

How can i set the width of line?

Post by liguosheng » Wed Nov 09, 2016 1:09 pm

I want to draw of line, its' width is 0.15mm, how can I?
thanks a lot!

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

Re: How can i set the width of line?

Post by andrew » Wed Nov 09, 2016 1:22 pm

Please allow me to refer you to this detailed post about entity attributes:
http://www.qcad.org/rsforum/viewtopic.php?f=47&t=3202

liguosheng
Active Member
Posts: 33
Joined: Thu Jan 14, 2016 4:17 am

Re: How can i set the width of line?

Post by liguosheng » Wed Nov 09, 2016 1:31 pm

By property editor, the width of line can be edited. However, if i want to set the width of line before it be drawn, which function can be uesed?
thanks!

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

Re: How can i set the width of line?

Post by andrew » Wed Nov 09, 2016 1:33 pm

In the above mentioned post, please scroll down to "Fixed Attributes".

liguosheng
Active Member
Posts: 33
Joined: Thu Jan 14, 2016 4:17 am

Re: How can i set the width of line?

Post by liguosheng » Thu Nov 10, 2016 1:57 pm

by "Fixed Attributes", the width of line can be edited. However, i want to change a line which its' property isn't 'by layer', its' width must be setted by code. When 'setLineweight' is be usede, its' width cann't be changed, its' color can be changed. Why?

liguosheng
Active Member
Posts: 33
Joined: Thu Jan 14, 2016 4:17 am

Re: How can i set the width of line?

Post by liguosheng » Thu Nov 10, 2016 2:52 pm

In the commuity version, is the width of line to be setted by code? that is to say, the width of line cann't be setted by code. Only its' color can be setted by code.

liguosheng
Active Member
Posts: 33
Joined: Thu Jan 14, 2016 4:17 am

Re: How can i set the width of line?

Post by liguosheng » Fri Nov 11, 2016 2:29 am

when a line is finished, i want to draw some different lines according to the path of the line by code automatically, How is it realized?
Thanks!
can someone help me?

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

Re: How can i set the width of line?

Post by andrew » Fri Nov 11, 2016 8:57 am

setLineweight will set the line weight of an entity to any of the available line weights (see http://www.qcad.org/doc/qcad/latest/dev ... bea7d2ac58). RLineweight::WeightByLayer is the default value.
when a line is finished, i want to draw some different lines according to the path of the line by code automatically
Please start a new topic for new, unrelated questions. Also, please be as specific as possible, provide examples, screenshots, etc. to explain what you are trying to achieve. This will greatly increase the chances of getting a helpful response. Thanks.

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”