TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: valerik88 on July 19, 2016, 02:43:39 PM

Title: How to select objects from exploded block?
Post by: valerik88 on July 19, 2016, 02:43:39 PM
I have some block vlaB that consists of some objects, so I explode and delete it by
Code: [Select]
(vla-Explode vlaB)
(vla-delete vlaB)
So block have been deleted, and there are some objects that was inside my block.
How to get list of this objects, that come in sight after exploding block?
Title: Re: How to select objects from exploded block?
Post by: ronjonp on July 19, 2016, 02:54:51 PM
Here are a couple of ways:
Code - Auto/Visual Lisp: [Select]
  1. (vlax-safearray->list (vlax-variant-value (vla-explode (vlax-ename->vla-object (car (entsel))))))
  2. (vlax-invoke (vlax-ename->vla-object (car (entsel))) 'explode)
Title: Re: How to select objects from exploded block?
Post by: hmspe on July 19, 2016, 06:58:59 PM
acet-explode also works.  It is a built-in command in Bricscad.
Title: Re: How to select objects from exploded block?
Post by: valerik88 on July 20, 2016, 01:29:27 PM
Here are a couple of ways:
Code - Auto/Visual Lisp: [Select]
  1. (vlax-safearray->list (vlax-variant-value (vla-explode (vlax-ename->vla-object (car (entsel))))))
  2. (vlax-invoke (vlax-ename->vla-object (car (entsel))) 'explode)

Thanks