Message 1 of 24
Explode Dynamic Block by effective name

Not applicable
10-27-2020
08:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have recently received great help from this forum and am back with hopefully a more simple request. I have searched and could not find anything that I could get working for my needs. I'm working with dynamic blocks. It seems that exploding them via a lisp is slightly tricky due to their potential anonymous names. I have some of LM's code for working with dynamic blocks and would like to add to it. Code is below. When I add my code and run it, there doesn't appear to be any changes.
.....
(repeat (setq idx (sslength sel))
(if (setq idx (1- idx)
obj (vlax-ename->vla-object (ssname sel idx))
vis (cadr (assoc (strcase (LM:blockname obj)) lst))
)
(LM:SetVisibilityState obj vis))))
(RG:XDYNBLK OBJ) ;here is where i added my call
(princ)
)
(defun RG:XDYNBLK (bname)
(vla-get-effectivename bname) ;i've read about setting filters for the name and can't find a good place to learn about it either.
(command "_explode" bname)
)
Thanks for your help.