List Entity in an Block

Discussion in 'AutoCAD' started by Genoud Alain, Aug 22, 2004.

  1. Genoud Alain

    Genoud Alain Guest

    hi,

    Its possible to list all entity in an Block ?
    VBA or Lisp
     
    Genoud Alain, Aug 22, 2004
    #1
  2. if you use the vba "explode" method on a block..The block
    remains intact and a copy of the objects that make up the block are
    created..you can now extract the data you need from each entity and
    then delete...
     
    Paul Richardson, Aug 22, 2004
    #2
  3. Genoud Alain

    John Holmes Guest

    Why work so hard?

    Try somthing like this

    Dim TheEntity As AcadEntity
    Dim TheBlock As AcadBlock
    ..
    ..
    {get your block here}
    ..
    ..
    For Each TheEntity In TheBlock
    {Process for each entity here
    Next

    John Holmes
     
    John Holmes, Aug 23, 2004
    #3
  4. Genoud Alain

    Anthony Ryan Guest

    It is possible to find out what entities exist for the block in
    question by going through the collection of blocks and finding the one
    that you are after, then iterating through the subitems (i think that
    is what its called) of that block to work out what is there (its the
    same as exploding the block, but without the exploding).

    Anthony
     
    Anthony Ryan, Aug 23, 2004
    #4
  5. Because my brain hurts on the weekends...:)
     
    Paul Richardson, Aug 23, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.