Quickly written - not sure if this will be any quicker to run:
Grrr, I tried dissecting yours but I'm so unfamiliar with the visual lisp functions that's its pretty pathetic on my part. Thanks for the effort. Hopefully you will find a use -David
(vla-item (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object))) (vla-get-EffectiveName blk))
means obtaining the block definition's collection [something like (tblobjname "BLOCK" blockname)], but the difference is that collection is something like list, that can be iterated.(eq "AcDbBlockReference" (vla-get-ObjectName o))
The above means something like:(eq "INSERT" (cdr (assoc 0 (entget o))))
HTH.@Grrr1337: Why do you have line 6 in your NestedBlock function? :idea:
Lee, your's works fine and is a bit faster. Thank you