Hello All:
When dynamic blocks are inserted they're assigned an anonymous block name. I'd like to be able to retrieve the name of the parent block after selecting the block on screen using AutoLisp.
Does anyone have a bit of code that handles this?
Thanks
Mark Ash
(defun c:demo (/ obj) (vl-load-com) (if (setq obj (ssget "_:S:E" '((0 . "INSERT")))) (vla-get-effectivename (vlax-ename->vla-object (ssname obj 0)) ) ) )
pbejse:
That works like a charm. Extending the thought process one step, can you tell me how I could change the parent block name to another block?
Sorry to be a bother.
Thanks,
Mark
@Anonymous wrote:pbejse:
That works like a charm. Extending the thought process one step, can you tell me how I could change the parent block name to another block?
Sorry to be a bother.
Thanks,
Mark
Yes, look into ConvertToAnonymousBlock or ConvertToStaticBlock Method
HTH