Dimension macro with Scale

Dimension macro with Scale

AzzaRazzamataz
Contributor Contributor
653 Views
3 Replies
Message 1 of 4

Dimension macro with Scale

AzzaRazzamataz
Contributor
Contributor

hey everyone

Just having trouble with a simple macro I can't get right.
I'm trying to set a dimension button to -
Change to layer > Change to dimension style > activate command 

 

^C^C-LA;S;LAYER;;-dimstyle;r;MY_DIMSTYLE;_dimlinear;

 

All good, works fine except the DIMSCALE is always set back to the original dimstyle scale and not the <style overrides> scale currently set in the drawing.
I think I'm missing a (getvar "dimscale") or something somewhere in the macro?

So basically I want to put a dimension down on a certain layer with the current scale.

 

0 Likes
654 Views
3 Replies
Replies (3)
Message 2 of 4

ВeekeeCZ
Consultant
Consultant

It does not behave that way to me. It honers the dimscale as expected.

Which acad version you have? Why you don't use 'dimlayer? 

Post a test drawing with the styles.

 
0 Likes
Message 3 of 4

pendean
Community Legend
Community Legend
also... do you need to get into using Annotative dimstyles and rely less on DIMSCALE as a setting?
0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant

@AzzaRazzamataz wrote:

... the DIMSCALE is always set back to the original dimstyle scale and not the <style overrides> scale currently set in the drawing.

....


For me, it also does that.  But that's exactly what I would expect.  If, when you have any dimensioning variable overrides in effect, you set a different Style current from in the Dimension Style dialog box, you get this warning:

Kent1Cooper_0-1618577684240.png

I don't see why it shouldn't do the same when you change the current Style in a DIMSTYLE command.  [This is from Acad2019.  Maybe that's changed in newer versions.]

 

I find that with a Dimension that has a scale override, changing its assigned Style in the Properties palette or with the VLA StyleName property also brings the scale associated with the new Style along with it, discarding that override.  But using the AutoLisp  (entmod (subst ... ))  method, I can change the Style without discarding the scale override.  I don't know whether that can be done in a macro, because it would mean drawing the Dimension first under current settings, then changing its Style.  That might be achievable if you can always draw the Dimension with the same number of inputs.  Or you could have an AutoLisp command defined, and have the macro call that.

Kent Cooper, AIA
0 Likes