Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Get current drawing scale, then insert block via that scale

  1. #1
    Active Member
    Join Date
    2006-04
    Posts
    85
    Login to Give a bone
    0

    Question 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!

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Get current drawing scale, then insert block via that scale

    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.

  3. #3
    Active Member
    Join Date
    2006-04
    Posts
    85
    Login to Give a bone
    0

    Default Re: Get current drawing scale, then insert block via that scale

    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.

  4. #4
    Certifiable AUGI Addict robert.1.hall72202's Avatar
    Join Date
    2004-07
    Location
    Detroit Michigan
    Posts
    2,508
    Login to Give a bone
    0

    Default Re: Get current drawing scale, then insert block via that scale

    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?

  5. #5
    Active Member
    Join Date
    2006-04
    Posts
    85
    Login to Give a bone
    0

    Default 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.
    Attached Files Attached Files

  6. #6
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Exclamation 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.
    Attached Files Attached Files

  7. #7
    All AUGI, all the time zoomharis's Avatar
    Join Date
    2005-02
    Location
    Abu Dhabi (Native-India)
    Posts
    506
    Login to Give a bone
    0

    Default Re: Get current drawing scale, then insert block via that scale

    Additionally, you may find this thread helpful.

  8. #8
    Active Member
    Join Date
    2005-02
    Posts
    95
    Login to Give a bone
    0

    Default 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")).

  9. #9
    Active Member
    Join Date
    2006-04
    Posts
    85
    Login to Give a bone
    0

    Default Re: Get current drawing scale, then insert block via that scale

    Thanks for the replies people, time for a re-think I think!!

  10. #10
    Member
    Join Date
    2011-02
    Location
    Orlando Florida
    Posts
    14
    Login to Give a bone
    0

    Default 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

Page 1 of 2 12 LastLast

Similar Threads

  1. Block and VP scale insert
    By Techdon1 in forum AutoLISP
    Replies: 2
    Last Post: 2009-07-02, 03:18 PM
  2. Replies: 1
    Last Post: 2007-08-17, 12:37 AM
  3. Insert block definition from one drawing into current drawing
    By ktisdale.118609 in forum VBA/COM Interop
    Replies: 2
    Last Post: 2006-08-08, 10:28 PM
  4. Insert a Block with default scale set to 1
    By okillham in forum AutoLISP
    Replies: 8
    Last Post: 2005-05-09, 07:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •