DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Macro Hook to adjust dimension text

Started by MarkX, January 28, 2013, 08:03:36 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MarkX

There's a great deal of difference of opinion on what dimension text should look like? Do you use R to indicate radius, or a greek letter? Do you have a zero in front of decimal numbers, or knock it off?

How about a hook on dimensions that runs a specified macro? The macro would adjust the text however the user needed it for his/her locale and work requirements.

Something to think about.

Mark

Lar

Dcad dimensions have so many parameters (which is good) and there are so many dimension types that such a macro would be huge. What you can do is save samples of dimensions to a file, then, when creating dimensions open this file, start a dimension and use the 'same as' finger (from the dimension command) on the style you want and abort the command. Then switch back to the original drawing and draw your dimensions with the new style. Or, after creating some dimensions, you can paste in one of the sample dimensions, select the ones to change, open the info box and click the 'same as' finger on the sample dimension. The selected dimensions will change to match the sample clicked on (which I find to be more reliable that the dimension command 'same as').

With this method you can continuously add different dimensions styles to the sample file and you won't have to worry about remembering how the style looks, because you will have able to see them (as opposed to saving styles, like in acad - even previews tend to be somewhat unreliable).

Lar

MarkX

Quote from: Lar on January 28, 2013, 11:01:20 AM
Dcad dimensions have so many parameters (which is good)...
...
With this method you can continuously add different dimensions styles to the sample file and you won't have to worry about remembering how the style looks, because you will have able to see them (as opposed to saving styles, like in acad - even previews tend to be somewhat unreliable).
Dcad doesn't have as many dimension parameters as, say, TurboCad which lets you specify (among other things) whether you have leading zeroes or not.

But the number of parameters wouldn't matter. The macro would only massage the main text. You would assign one macro to one dimension, and re-use that dimension (just like in your example) when you needed a dimension with those special macro-driven capabilities.

Your style approach doesn't fix things if you want to use something other than R for radius, or format numbers without a leading zero,  or automatically asterisk a dimension if it goes over stock length, or use a floor or ceil function, or ...

The macro approach would give a great deal of flexibility to dimensions without having to increase the number of parameters (except for the additional parameter that specifies the macro to use).

Thanks!
Mark

JJG

Quote from: Lar on January 28, 2013, 11:01:20 AM
... open the info box and click the 'same as' finger on the sample ...
In this forum, there is a macro to do exactly that without opening the info box ...
This is already a beginning ... if one looks absolutely for a macro ...
(I am joking, of course!)