block entities

Discussion in 'AutoCAD' started by perriwinkle, Mar 3, 2005.

  1. perriwinkle

    perriwinkle Guest

    I give! I am trying to understand how to go through a block entity list, and it is something I just can not seem to get. This is to look for text inside of a block and delete it... but in general how do I get through block entities?


    (defun c:mytest ()
    (setq ssmine (ssget "x" (list (cons 0 "insert"))))
    (setq lenssmine (sslength ssmine))
    (setq count 0)
    (while (/= count lenssmine)
    (setq entName (ssname ssmine count))
    (setq blkEnt (entget entName))
    (WHILE (/= (CDR (ASSOC 0 blkEnt)) "SEQEND")
    (SETQ blkEnt (entnext(CDR (ASSOC -1 blkEnt))))
    (if (= "text" (cdr (assoc 0 blkEnt)))
    (entdel blkEnt)
    )
    )

    (setq count (+ 1 count))

    )

    )
     
    perriwinkle, Mar 3, 2005
    #1
  2. perriwinkle

    Doug Broad Guest

    Why don't you just refedit one block and delete the text?
    That way you can delete both text entities and attributes and
    then use Attsync to clean things up.

    Programmatically, block entities, other than attributes are
    not stored with the block reference entity, but instead are
    stored with the block definition. You can access the block
    definition with tblobjname function.

    To make attributes hidden, just use attdisp off.




    something I just can not seem to get. This is to look for text inside of a block and
    delete it... but in general how do I get through block entities?
     
    Doug Broad, Mar 3, 2005
    #2
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.