[Solved] QCAD drawing default line width settings

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
WildWolfCJ
Full Member
Posts: 84
Joined: Fri Oct 20, 2023 7:21 am

[Solved] QCAD drawing default line width settings

Post by WildWolfCJ » Wed Nov 29, 2023 8:03 am

WIN10 qcad3.28.2 pro
Hello everyone, while using QCAD, I found that there is a default line width for drawing graphics. What if I set the configuration file to change the default line width to the default value?
Last edited by WildWolfCJ on Wed Dec 06, 2023 4:06 am, edited 1 time in total.

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD drawing default line width settings

Post by CVH » Wed Nov 29, 2023 8:45 am

WildWolfCJ wrote:
Wed Nov 29, 2023 8:03 am
What if I set the configuration file to change the default line width to the default value?
To my knowledge there is no default for the Default Lineweight itself.
See Application Preferences .. Graphics View .. Appearance .. Linetypes and Lineweights .. Default Lineweight

You can set this from 0.00mm up to 2.11mm and then all line-art that uses the Default weight will be rendered in the chosen weight.
This does not affect weights inherited form layers or as individual property other than 'Default'.
Line-art in Default weight may thus be rendered differently on other computers where the user has preferred to use a different weight.

You should not edit the configuration file (QCAD.ini/config) in direct unless you know what you are doing.
It will not have any effect when QCAD is running there the settings are cached and stored back on termination.

Regards,
CVH
Last edited by CVH on Tue Dec 05, 2023 9:40 am, edited 1 time in total.

WildWolfCJ
Full Member
Posts: 84
Joined: Fri Oct 20, 2023 7:21 am

Re: QCAD drawing default line width settings

Post by WildWolfCJ » Wed Nov 29, 2023 9:17 am

HI CVH
See Application Preferences .. Graphics View .. Appearance .. Linetypes and Lineweights .. Default Lineweight
Thank you very much for your answer. I followed this method and found that the default line width of the drawn graphics is still 0.25. I restarted QCAD and it still doesn’t work.
Attachments
VeryCapture_20231129161414.jpg
VeryCapture_20231129161414.jpg (157.37 KiB) Viewed 5659 times

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD drawing default line width settings

Post by CVH » Wed Nov 29, 2023 10:22 am

WildWolfCJ wrote:
Wed Nov 29, 2023 9:17 am
I followed this method and found that the default line width of the drawn graphics is still 0.25
CVH wrote:
Wed Nov 29, 2023 8:45 am
This does not affect weights inherited form layers or as individual property other than 'Default'.
Drawing entities usually (= common practice) inherited the pen size form the layer they are on: ByLayer
Or they may use a custom pen size.
Only if that is set to 'Default' then the application default size is used.

Weight 0.00mm may or may not export well to paper or pdf/svg.
For the geometry that doesn't matter ... All vector art has an infinite small width. :wink:

Regards,
CVH

WildWolfCJ
Full Member
Posts: 84
Joined: Fri Oct 20, 2023 7:21 am

Re: QCAD drawing default line width settings

Post by WildWolfCJ » Thu Nov 30, 2023 2:05 am

Drawing entities usually (= common practice) inherited the pen size form the layer they are on: ByLayer

HI CVH Thank you for your patient answer. I understand that the pen width of drawing entities is inherited from the layer. Is there any way to set the default pen width of the layer to default? I found that the default pen width of the layer is 0.25 (ISO)

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD drawing default line width settings

Post by CVH » Thu Nov 30, 2023 10:17 am

WildWolfCJ wrote:
Thu Nov 30, 2023 2:05 am
HI CVH Thank you for your patient answer. I understand that the pen width of drawing entities is inherited from the layer. Is there any way to set the default pen width of the layer to default? I found that the default pen width of the layer is 0.25 (ISO)
First define what the Lineweight 'Default' should be for you, globally, application based.
See: Application Preferences .. Graphics View .. Appearance .. Linetypes and Lineweights .. Default Lineweight
The sole exception is that the application default Lineweight can not be 'Default' itself ... It can't be recursive, right?

Edit the layer and set Lineweight to 'Default'. See layer List widget.
Ensure that entities on this layer that should inherit this attribute have Lineweight 'By Layer'.

Entities can also have a custom Lineweight set and that can be any weight including 'Default'.
If you change their layer(s) attribute(s) then it is obvious that they stick to the custom set Lineweight.

For new layers created with QCAD in an existing drawing one can set the attribute defaults under Application Preferences .. Layer .. Add Layer.
And there you can also set the default attributes for the mandatory Layer 0 in a new file created with QCAD.

That should cover all Preferences there are.
Again, there are no defaults for 'Default', that is all up to you.

Regards,
CVH

WildWolfCJ
Full Member
Posts: 84
Joined: Fri Oct 20, 2023 7:21 am

Re: QCAD drawing default line width settings

Post by WildWolfCJ » Fri Dec 01, 2023 4:40 am

HI CVH Thank you very much for your patient answer.
First define what the Lineweight 'Default' should be for you, globally, application based.
I think the default line width is 0.00mm, but I followed
”See: Application Preferences .. Graphics View .. Appearance .. Linetypes and Lineweights .. Default Lineweight
"
Set 0.00mm and restart QCAD. The drawing line width is not 0.00mm. I don't know how to solve it.

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD drawing default line width settings

Post by CVH » Fri Dec 01, 2023 8:47 am

Although QCAD asks to restart, any change of the application default Lineweight value is instantaneously.
There may be other reasons why a restart flag is set for this or these set of preferences.
WildWolfCJ wrote:
Fri Dec 01, 2023 4:40 am
I think the default line width is 0.00mm, but I followed
Agreed, on first install or after resetting the configuration a practical value is preset.
What to use as default value is up to you, your firm/organisation or an industry standard if any.
WildWolfCJ wrote:
Fri Dec 01, 2023 4:40 am
Set 0.00mm and restart QCAD. The drawing line width is not 0.00mm. I don't know how to solve it.
Please attach your drawing or a drawing example.
I suspect that the entities in question have a custom Lineweight or inherent such from their layer.


Refering to the test.dxf drawing attached to: https://www.qcad.org/rsforum/viewtopic. ... 442#p42897
I wrote
CVH wrote:
Thu Nov 30, 2023 1:10 pm
The single entity on layer 0 has a custom set Lineweight of 2.11mm.

Regards,
CVH

WildWolfCJ
Full Member
Posts: 84
Joined: Fri Oct 20, 2023 7:21 am

Re: QCAD drawing default line width settings

Post by WildWolfCJ » Mon Dec 04, 2023 4:54 am

See Application Preferences .. Graphics View .. Appearance .. Linetypes and Lineweights .. Default Lineweight

I tried it. No matter how I change it, the default pen width of the newly created drawing is by layer and the width is 0.25mm. The settings here have no effect.

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD drawing default line width settings

Post by CVH » Mon Dec 04, 2023 8:39 am

Tested this in QCAD Pro 3.27.6.0 & 3.28.2.0 ; QCAD CE 3.27.9.0
Works like a charm.
WildWolfCJ wrote:
Mon Dec 04, 2023 4:54 am
the default pen width of the newly created drawing is by layer and the width is 0.25mm
The keywords here are 'newly created drawing'
As stated earlier:
CVH wrote:
Thu Nov 30, 2023 10:17 am
For new layers created with QCAD in an existing drawing one can set the attribute defaults under Application Preferences .. Layer .. Add Layer.
And there you can also set the default attributes for the mandatory Layer 0 in a new file created with QCAD.
New files are created with at least the mandatory Layer 0 declared.
See: Application Preferences .. Layer .. Add Layer .. Default Lineweight for Layer 0
And also Default color for layer 0
That is upon creation of a new drawing, any change to these attributes afterwards is up to you.

For an existent drawing (also an newly created with the Layer 0) the defaults for adding extra layers are:
Application Preferences .. Layer .. Add Layer .. Default Lineweight for new layers
And also Default color for new layers
Again upon creation of any additional new layer.

Both these layer preferences can be set to 'Default' or a specific 0.00mm ... 2.11mm lineweight.
What 'Default' refers to is set in:
Application Preferences .. Graphics View .. Appearance .. Linetypes and Lineweights .. Default Lineweight
'Default' can be set to a 0.00mm ... 2.11mm lineweight.
The lineweight 'Default' is defined application wide and can differ between machines, applications, installations or users.

Should be self-explanatory and was explained higher up. :wink:

Regards,
CVH

WildWolfCJ
Full Member
Posts: 84
Joined: Fri Oct 20, 2023 7:21 am

Re: QCAD drawing default line width settings

Post by WildWolfCJ » Tue Dec 05, 2023 2:34 am

Wow, after so many days of discussion, I finally solved this problem. Thank you so much.

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD drawing default line width settings

Post by CVH » Tue Dec 05, 2023 9:45 am

Nice, :wink:

If considered solved then please edit the title of your initial post in this topic and prefix it with [Solved]

Regards,
CVH

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”