0 Members and 1 Guest are viewing this topic.
(assoc 2 (entget(car(entsel))))
(2 . "*U237")
Thanks, I wonder why they make it more complicated.
Quote from: dubb on August 28, 2018, 03:48:57 PMThanks, I wonder why they make it more complicated.Because it needs to be. If the block name wasn't unique, then changing one dynamic property would chance the properties of *all* instances of that block. While that may be desirable in some circumstances it would really neuter features like having one block definition with multiple visibility states.
Thanks to your explanation, I found out if I resetted all of my dynamic blocks, then generated a list of blocks, I didn't get anonymous block names.
I use UnAnon.Lsp by David Bethel for renaming an anonymous block. It's on his free lisp page: http://www.davidbethel.com/lisp/
Unanon.lsp will probably need updating as IIRC it has an error routine that contains command call(s). This will cause an error in AutoCAD 2015 and later.