Minor Tweak to Dimension Baseline Setting

Please use this forum to post feedback and suggestions related to QCAD.

Moderator: andrew

Post Reply
GrowMate
Active Member
Posts: 42
Joined: Tue Jan 26, 2021 11:45 pm

Minor Tweak to Dimension Baseline Setting

Post by GrowMate » Sat Jun 10, 2023 10:32 pm

The default Dimension Line Increment is entered at Drawing Preferences >Dimension >Dimension Settings > Dimension Line Increment.

Ideally, the value chosen should show up in the top ribbon when the DB command is invoked and the Default spacing box is unchecked. Users would then see what value is in force and would be able to adjust it up or down without having to check back through the Drawing Preferences routine!

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

Re: Minor Tweak to Dimension Baseline Setting

Post by CVH » Sun Jun 11, 2023 1:03 am

Hi,
may I remark that Dimension Line Increment is a document global default setting.
The increment value is not a dimension entity property that will be updated throughout the drawing when you alter it.

When invoking DB one has to indicate the base dimension first and then a preview of a new dimension is shown.
This is spaced according the DB spacing option in the Option Toolbar.
After creating a new and spaced dimension there is no longer a relation with the base dimension.

DefaultSpacingDB.png
DefaultSpacingDB.png (35.79 KiB) Viewed 7323 times

For some reason the 'Spacing' option is empty at first use but at any point one can opt to not use default spacing and enter a value there.

CustomSpacingDB.png
CustomSpacingDB.png (38.25 KiB) Viewed 7323 times


To change the the global preference for a drawing one needs to edit the drawing preferences.
The settings for all new drawings are altered in the application preferences.
The actually used spacing can be altered on the fly. :wink:
DB spacing options on the Option Toolbar are saved persistent between usage.

Regards,
CVH

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

Re: Minor Tweak to Dimension Baseline Setting

Post by CVH » Sun Jun 11, 2023 6:50 am

It seems more complex than at first glance. :wink:

First, DimContinue is DimBaseline without the additional spacing UI in the Options Toolbar.
When =DimContinue and the base dimension is an Ordinate then spacing is the document default otherwise it is zero.
When =DimBaseline and default is ticked then it is the document default otherwise it is the current set spacing value.

The default is retrieved once when initiating DimContinue or DimBaseline.
This is based on a document variable called 'dimdli' or 2 times the dimension text height when not defined.

An artifact is then that one could change the drawing preferences while DB or DC is running ...
... Without that they notice the applied change in spacing. :roll:

As far as I can figure out the slot changes functions do not retrieve the document default value.
They only adapt an internal flag or value to the slot new status.

Code: Select all

DimBaseline.prototype.slotDefaultSpacingChanged = function(v) {
    this.useDefaultSpacing = v;                // True or False
};
DimBaseline.prototype.slotSpacingChanged = function(v) {
    this.spacing = v;                          // A value v
};
What also means that setting the spacing value slot inactive or not is at UI level.

On initiating, the Spacing slot and the DefaultSpacing slot their value/state are retrieved from QCAD.ini/config where they were stored persistent. At first use that are the UI defaults as there is nothing stored to refer to.

I see the conflict in what to set in the Spacing slot on initiating, the drawing preference or the stored value if any.
Remark that if we update the Spacing slot with the default one the original custom value is literately overwritten.

One could alter slotDefaultSpacingChanged so that it retrieves the drawing preference and sets the Spacing slot each time it is changed to true.
That would then update this.spacing in the case that the Spacing slot value changes.

One could implement retrieving the drawing preference in DimBaseline.prototype.getSpacing = function() so that on each call it uses up to date preferences when opted for default spacing. On any change in the retrieved actual default spacing the Spacing slot should then reflect that too.

When not opting for the default, the Spacing value option is always in absolute units.
It is mentioned in the code but inactive ... Ruled out:
Remark that Drawing Preferences .. Size Scale Factor isn't used as factor for the document default spacing value. :roll:
Although each sub-shape of a dimension is scaled accordingly, everything becomes larger or smaller, the spacing preference is fully independent. :?

Regards,
CVH

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

Re: Minor Tweak to Dimension Baseline Setting

Post by CVH » Sun Jun 11, 2023 7:51 am

GrowMate wrote:
Sat Jun 10, 2023 10:32 pm
Users would then see what value is in force and would be able to adjust it up or down without having to check back through the Drawing Preferences routine!
Would displaying the current default value by drawing preference as DefaultSpacing slot Tooltip work for you?
That way the former custom used value is not overwritten by visualizing the default value.

Regards,
CVH

GrowMate
Active Member
Posts: 42
Joined: Tue Jan 26, 2021 11:45 pm

Re: Minor Tweak to Dimension Baseline Setting

Post by GrowMate » Mon Jun 12, 2023 5:22 pm

Oh dear, my knowledge of programming is zilch, so I'm blissfully ignorant of the earthquake a 'minor' tweak can unleash! And this is such a trivial issue it doesn't justify a lot of effort.
What I had in mind was a simple arrangement whereby the prevailing default value is "echoed" next to the blank entry point at the top of the screen so that you have a starting-point to refer to should you want to tweak your dimension spacings. If you then decided to adopt your tweak permanently you would do so by adjusting the default setting via the Drawing Preferences menus.
This sounds much like the suggestion you have made in your most recent posting?

Best wishes . . .

Post Reply

Return to “QCAD Suggestions and Feedback”