Friday quick & dirty freebie ... not the most efficient but free ...
That's a Fenomonal Friday Freebie, MP!
I made a couple mods.
Mod 1 - I wanted to preserve the original block name and just add the numeric suffix to it, rather than renaming them to the generic "STATIC_#".
In the "_dynamic->static_block" function, I changed:
(_make_key blocks "STATIC_" len)
was changed to
(_make_key blocks (strcat (vla-get-EffectiveName insert) "_") len)
Mod 2 - The function was bombing if the block it found was nested within an Xref.
(foreach insert inserts
(_dynamic->static_block blocks insert len)
)
was changed to
(foreach insert inserts
(if (null (wcmatch (vla-get-name insert) "*|*"))
(_dynamic->static_block blocks insert len)
)
)
Works great otherwise! Thanks!