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)) ) )
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?