Get current drawing scale, then insert block via that scale
I've got palettes with blocks on and have to either add a scale action to each block (and manually change each block) or create different palettes for different scales. Is it possible to set up dynamic blocks to automatically look up the current scale setting in the drawing and input that into scale actions within the block?
I've used a lot of VBA in Access and Excel but none at all in Autocad and I really wish there was a Macro Recorder to help me pick up the key words & functions etc!
1 Attachment(s)
RE: Get current drawing scale, then insert block via that scale
Not quite. We don't use 'DimScale' but work exclusively in model space and use paper space (with relevantly scaled viewports) for printing purposes. What we would love is for the blocks to pick up the currently selected 'DimStyle'
The file I've uploaded is a standard I'm creating for reinforced steelwork. Various blocks have been created 3 times to be put on 3 separate palettes depending on dimstyle scale. What would be nice is 1 set of blocks on 1 palette that size themselves automatically according to the currently selected dimstyle scale.
1 Attachment(s)
RE: Get current drawing scale, then insert block via that scale
Quote:
Originally Posted by david.pugh
Not quite. We don't use 'DimScale' but work exclusively in model space and use paper space (with relevantly scaled viewports) for printing purposes. What we would love is for the blocks to pick up the currently selected 'DimStyle'
The file I've uploaded is a standard I'm creating for reinforced steelwork. Various blocks have been created 3 times to be put on 3 separate palettes depending on dimstyle scale. What would be nice is 1 set of blocks on 1 palette that size themselves automatically according to the currently selected dimstyle scale.
Looking at your drawing shows that, given your description of working only in ModelSpace, your DimStyles are setup incorrectly.
You have dimension styles for each scale factor, yet in those styles you are not setting the DimScale correctly. The 1 to 50 style should have a dimScale of 50, not 1. All the object sizes, such as arrow heads and text sizes, are manually scaled up to the multiplied value. This is counter to the intended use of DimScale.
And that is where your other difficulties are coming in.
See the attached drawing with correct dimension styles. By using those dimension styles you will then be able to use tool palette features as Autodesk intended.
RE: Get current drawing scale, then insert block via that scale
Additionally, you may find this thread helpful.
RE: Get current drawing scale, then insert block via that scale
Hi!
I have a same problem that with you. I have solved this problem using dimscale variable. If your scale is 1:100 then change the value of DIMSCALE. when ever you want to insert or draw you can use this variable. I used in autolisp (setq geds (getvar "dimscale")).
RE: Get current drawing scale, then insert block via that scale
Thanks for the replies people, time for a re-think I think!!
Re: Get current drawing scale, then insert block via that scale
Not sure if this will help but works for me. My blocks has atrbutes, this inserts to whatever scale is set. Just change tageqpm with you block. Put in on a button.
^C^Cattreq;0;^C^C-layer;m;N-MHEQUIPTAG;color;yellow;;;ortho;on;-insert;tageqpm;\(getvar "dimscale");;\-attedit;;;;C^Cate