Results 1 to 6 of 6

Thread: annotation scale setting problem

  1. #1
    AUGI Addict bowlingbrad's Avatar
    Join Date
    2003-11
    Location
    Chicago
    Posts
    1,233
    Login to Give a bone
    0

    Default annotation scale setting problem

    Switching over to ACA 2012 is giving me an error when I run my routine:

    bad argument type: lentityp nil

    I have tracked it down to the line: (setq tempDictListEnt (entmakex tempDictList))

    where tempDictList is a list: ((0 . "SCALE") (100 . "AcDbScale") (300 . "6\" = 1'-0\"") (140 . 1.0) (141 . 2.0))


    Did 2012 change the symbol table name of anno scales?
    It could have been 2010, 2011 or 2012.... we are upgrading from 2009.

  2. #2
    All AUGI, all the time
    Join Date
    2015-10
    Location
    Belgrade, Serbia, Europe
    Posts
    564
    Login to Give a bone
    0

    Default Re: annotation scale setting problem

    It hasn't been changed :

    For main dictionary use :
    Code:
    (entget (namedobjdict))
    For search for dictionary "ACAD_SCALELIST" use :
    Code:
    (dictsearch (namedobjdict) "ACAD_SCALELIST")
    And for specific scale :
    Code:
    (dictsearch (cdr (assoc -1 (dictsearch (namedobjdict) "ACAD_SCALELIST"))) "A0")
    witch will give you :
    ((-1 . <Entity name: 7ffffb050d0>) (0 . "SCALE") (5 . "10D") (102 .
    "{ACAD_REACTORS") (330 . <Entity name: 7ffffb050c0>) (102 . "}") (330 . <Entity
    name: 7ffffb050c0>) (100 . "AcDbScale") (70 . 0) (300 . "1:1") (140 . 1.0) (141
    . 1.0) (290 . 1))
    As you can see, it's the same as you wrote...

    M.R.

  3. #3
    AUGI Addict bowlingbrad's Avatar
    Join Date
    2003-11
    Location
    Chicago
    Posts
    1,233
    Login to Give a bone
    0

    Default Re: annotation scale setting problem

    Thanks Marko...
    I'm confused then...
    Why did this routine work in 2009 and now it won't in 2012?

  4. #4
    All AUGI, all the time
    Join Date
    2015-10
    Location
    Belgrade, Serbia, Europe
    Posts
    564
    Login to Give a bone
    0

    Default Re: annotation scale setting problem

    To add new scale to ACAD_SCALELIST dictionary and CAD environment, you must use this sequence of commands :

    Code:
    (setq sc (entmakex '((0 . "SCALE") (100 . "AcDbScale") (70 . 0) (300 . "1:1000") (140 . 1.0) (141 . 1000.0) (290 . 0))))
    
    (entmod (subst (cons 330 (cdr (assoc -1 (dictsearch (namedobjdict) "ACAD_SCALELIST")))) (assoc 330 (entget sc)) (entget sc)))
    
    (entmod (append (dictsearch (namedobjdict) "ACAD_SCALELIST") (list (cons 3 "B7") (cons 350 sc))))
    I used SCALE 1:1000, but you may need different, so you must change (140 . ?) (141 . ?) DXF codes accordingly...

    M.R.

  5. #5
    AUGI Addict bowlingbrad's Avatar
    Join Date
    2003-11
    Location
    Chicago
    Posts
    1,233
    Login to Give a bone
    0

    Default Re: annotation scale setting problem

    Marko,
    I seem to be doing the exact steps you're outlining except for the (70 . 0).
    What is that used for?

  6. #6
    AUGI Addict bowlingbrad's Avatar
    Join Date
    2003-11
    Location
    Chicago
    Posts
    1,233
    Login to Give a bone
    0

    Default Re: annotation scale setting problem

    I added the '(70 . 0) to my entity list and it is still giving me the error.

Similar Threads

  1. Replies: 10
    Last Post: 2022-08-25, 10:06 PM
  2. Image in annotation scale problem
    By dfi in forum Revit Architecture - General
    Replies: 3
    Last Post: 2011-11-04, 08:22 AM
  3. Setting Annotation Scale in AutoCAD 2008
    By kdayman in forum VBA/COM Interop
    Replies: 4
    Last Post: 2009-10-27, 10:25 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. Invalid argument scale in setting standard scale property
    By gtepe.123006 in forum AutoCAD General
    Replies: 4
    Last Post: 2008-12-23, 02:10 AM

Posting Permissions

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