Results 1 to 7 of 7

Thread: Check for existing scale in annotation scales list?

  1. #1
    I could stop if I wanted to
    Join Date
    2001-10
    Location
    Defragging the internets.
    Posts
    336
    Login to Give a bone
    0

    Default Check for existing scale in annotation scales list?

    I want to add a button to create new annotation scales. If I use the command line version and add a scale that is already exist it asks to redefine (makes a script version error out). So I need to check to see if it exist. How do I do this? Or is there a way to force all of the ones I want regardless of current list?

    Any help would be great.

    Chris

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,764
    Login to Give a bone
    0

    Default Re: Check for existing scale in annotation scales list?

    Set EXPERT to 5 at the beginning of your script, then reset it at the end.
    R.K. McSwain | CAD Panacea |

  3. #3
    I could stop if I wanted to
    Join Date
    2001-10
    Location
    Defragging the internets.
    Posts
    336
    Login to Give a bone
    0

    Default Re: Check for existing scale in annotation scales list?

    rkmcswain,
    Thank you!

    I guess I didn't need to post in the lisp section, but I figured it would end up being done via lisp.


    What is the chance you have it all written out already?

    Chris

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,764
    Login to Give a bone
    0

    Lightbulb Re: Check for existing scale in annotation scales list?

    Quote Originally Posted by FRAMEDNLV
    What is the chance you have it all written out already?
    Slim and none.... Sorry.

    I was shocked myself that this command honors the EXPERT sysvar. Other commands that should, don't.
    R.K. McSwain | CAD Panacea |

  5. #5
    I could stop if I wanted to
    Join Date
    2001-10
    Location
    Defragging the internets.
    Posts
    336
    Login to Give a bone
    0

    Default Re: Check for existing scale in annotation scales list?

    Here is a picture of the scales that come with autocad and a list of the ones from Revit. I just don't get the standard scales.


    PS, your F1 key must be working better than mine. I looked all over and never ran across any link to expert.

    Thanks again,
    Chris
    Attached Images Attached Images
    Last edited by framedNlv; 2007-05-24 at 07:33 PM.

  6. #6
    I could stop if I wanted to
    Join Date
    2001-10
    Location
    Defragging the internets.
    Posts
    336
    Login to Give a bone
    0

    Default Re: Check for existing scale in annotation scales list?

    I got the script done and it seems to work fine. Posted it for others to copy.

    Code:
    (SETQ CANCUR(GETVAR "CANNOSCALE"))
    (SETVAR "CANNOSCALE" "1:1")
    EXPERT
    5
    -scalelistedit
    delete
    1:2
    delete
    1:4
    delete
    1:5
    delete
    1:8
    delete
    1:10
    delete
    1:16
    delete
    1:20
    delete
    1:30
    delete
    1:40
    delete
    1:50
    delete
    1:100
    delete
    2:1
    delete
    4:1
    delete
    8:1
    delete
    10:1
    delete
    100:1
    ADD
    6"= 1'-0"
    6:12
    ADD
    3"= 1'-0"
    3:12
    add
    1 1/2" = 1'-0"
    1.5:12
    add
    1" = 1'-0"
    1:12
    add
    3/4" = 1'-0"
    0.75:12
    add
    1/2" = 1'-0"
    0.5:12
    add
    3/8" = 1'-0"
    0.375:12
    add
    1/4" = 1'-0"
    0.25:12
    add
    3/16" = 1'-0"
    0.1875:12
    add
    1/8" = 1'-0"
    0.125:12
    add
    1"= 10'-0"
    1:120
    add
    3/32" = 1'-0"
    0.09375:12
    add
    1/16" = 1'-0"
    .0625:12
    add
    1" = 20'-0"
    1:240
    add
    3/64" = 1'-0"
    0.04875:12
    add
    1" = 30'-0"
    1:360
    add
    1/32" = 1'-0"
    0.03125:12
    add
    1" = 40'-0"
    1:480
    add
    1' = 50'-0"
    1:600
    add
    1" = 60'-0"
    1:720
    add
    1/64" = 1'-0"
    0.015625:12
    add
    1" = 80'-0"
    1:960
    add
    1" = 100'-0"
    1200:1
    exit
    (SETVAR "CANNOSCALE" CANCUR)
    expert
    0
    Chris
    edit: missed an inch sign on one.
    Last edited by framedNlv; 2007-05-31 at 07:14 PM.

  7. #7
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,764
    Login to Give a bone
    0

    Default Re: Check for existing scale in annotation scales list?

    Quote Originally Posted by FRAMEDNLV
    PS, your F1 key must be working better than mine. I looked all over and never ran across any link to expert.
    I didn't look. EXPERT has been around a while for suppressing prompts and dialogs that you many not want to see if you are an "expert"...

    For example, if EXPERT is set to 1 or higher and you turn the current layer OFF, then you are not warned about this.

    I was just surprised that they were still using this sysvar for new commands.....
    R.K. McSwain | CAD Panacea |

Similar Threads

  1. scale list missing fractional scales
    By JRBOURNE in forum CAD Management - General
    Replies: 5
    Last Post: 2011-10-18, 05:10 PM
  2. Permanently Add Scales to Scale List?
    By danielmiller19929945 in forum AutoCAD Customization
    Replies: 2
    Last Post: 2011-05-23, 12:43 PM
  3. Replies: 9
    Last Post: 2010-11-25, 11:03 AM
  4. Purge Annotation Scales That Are Not the Current Active Annotation Scale
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2009-02-01, 06:04 PM
  5. AutoCAD 2008 Delete scale from Annotation Scale list
    By cgerhardt in forum VBA/COM Interop
    Replies: 3
    Last Post: 2007-04-25, 02:21 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
  •