Results 1 to 2 of 2

Thread: AutoCAD 2008 - Iterate through an entity list

  1. #1
    Member
    Join Date
    2003-02
    Location
    Calgary, AB
    Posts
    44
    Login to Give a bone
    0

    Default AutoCAD 2008 - Iterate through an entity list

    I want to make a list of the annotative scale list in ACAD2008.

    if you type in the following on the command line:
    (setq MyList(dictsearch(namedobjdict)"ACAD_SCALELIST"))

    The following is displayed:
    ((-1 . <Entity name: 7efa1dd0>)
    (0 . "DICTIONARY")
    (5 . "3A")
    (102 . "{ACAD_REACTORS")
    (330 . <Entity name: 7efa1c60>)
    (102 . "}")
    (330 . <Entity name: 7efa1c60>)
    (100 . "AcDbDictionary")
    (280 . 0)
    (281 . 1)
    (3 . "A0")
    (350 . <Entity name: 7efa1dd8>) (3 . "A1")
    (350 . <Entity name: 7efa7038>) (3 . "A2")
    (350 . <Entity name: 7efa7040>) (3 . "A3")
    (350 . <Entity name: 7efa7048>) (3 . "A4")
    (350 . <Entity name: 7efa7050>) (3 . "A5")
    (350 . <Entity name: 7efa7058>) (3 . "A6")
    (350. and so on....

    I'm very rusty with AutoLisp and am wondering how I can iterate through the entities with assoc 350 contained in MyList? I want to output to a file all existing scales in the drawing.

    Thanks.

  2. #2
    100 Club CADmium's Avatar
    Join Date
    2004-08
    Location
    Eberswalde, Germany, Europe
    Posts
    128
    Login to Give a bone
    0

    Default Re: AutoCAD 2008 - Iterate through an entity list

    i can't test it in the moment, but ... try this
    Code:
    (and(setq MyList(dictsearch(namedobjdict)"ACAD_SCALELIST"))
        (setq Mylist(vl-remove-if-not'(lambda(x)(=(car X)350))MYlist))
        (mapcar
          '(lambda(x)
             (entget (cdr x))
           )  
          Mylist  
        )  
    )

Similar Threads

  1. Replies: 1
    Last Post: 2013-11-02, 11:41 PM
  2. Changing 'Z' coordinate for a MULTILEADER via Entity Association List
    By vladimir.karatsupa982899 in forum AutoLISP
    Replies: 3
    Last Post: 2012-06-29, 03:12 PM
  3. List of new features AutoCAD 2004 to 2008?
    By cadman_meg in forum AutoCAD General
    Replies: 6
    Last Post: 2008-06-04, 08:07 PM
  4. Accessing the annotation scale list in AutoCAD 2008
    By cgerhardt in forum VBA/COM Interop
    Replies: 0
    Last Post: 2007-04-24, 08:28 PM
  5. Edit Scale list in AutoCAD LT 2008
    By greypaw in forum AutoCAD LT - General
    Replies: 15
    Last Post: 2007-04-06, 04:50 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
  •