View Full Version : Get current drawing scale, then insert block via that scale
U.Rackharrow
2007-03-19, 05:14 PM
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!
RobertB
2007-03-21, 05:22 AM
If I'm reading you correctly, you have set up a parameter/action simply to match the block scale to the drawing scale? If so, that is a waste. That's what a block's normal scale factors have been used for over the last two decades.
U.Rackharrow
2007-03-21, 12:06 PM
Ok, let's try that again.
I create a simple stretchable arrow as a block which I then put on a palette so that I can drag 'n' drop into drawings. The drawings are at various scales eg. 1:50, 1:25, 1:10 etc.
If I add a scale parameter to the block, would it be possible to get the block to set itself to the current drawing dimstyle scale? On this simple example it is the size of the arrowheads which have to be scaled as the length has a stretch action anyway.
robert.1.hall72202
2007-03-21, 01:10 PM
I sort of understand what you are thinking.
In 2007, set each block in the tool palette to use an auxilary
scale. Use either dimscale or plot scale.
Hightlight several blocks at one time and the entire palette
can be changed.
Is this what you are looking for?
U.Rackharrow
2007-03-22, 01:16 PM
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.
RobertB
2007-03-23, 01:12 AM
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.
zoomharis
2007-03-23, 03:10 AM
Additionally, you may find this thread (http://forums.augi.com/showthread.php?t=36640) helpful.
avinash00002002
2007-04-02, 04:29 AM
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")).
U.Rackharrow
2007-04-02, 09:12 AM
Thanks for the replies people, time for a re-think I think!!
gbailey403067
2013-08-23, 04:12 PM
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
durrcraig740145
2016-12-09, 03:18 PM
How can I reset the dimscale value in a macro of an dimstyle?
Basically toggle on "Use overall scale of:" and set a values
AutoCAD 2014
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.