TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Woabow on May 13, 2013, 01:47:11 PM

Title: Finding objects inside INSERT/BLOCK
Post by: Woabow on May 13, 2013, 01:47:11 PM
There are several routines that lists the contents of a BLOCK. They will return the same data for any instance of a BLOCK in the drawing.

But what if I would like to have the contents of the INSERT, or in my case, I just want to have a list with all lines inside an INSERT with the drawing-WCS-coordinates of the lines.

Do I have to find the contents of a BLOCK first and "multiply" it with the INSERT matrix?
Title: Re: Finding objects inside INSERT/BLOCK
Post by: Lee Mac on May 13, 2013, 04:03:09 PM
Do I have to find the contents of a BLOCK first and "multiply" it with the INSERT matrix?

Yes  :-)
Title: Re: Finding objects inside INSERT/BLOCK
Post by: Woabow on May 13, 2013, 04:10:07 PM
Great :cry:

Our blocks are often nested, gives me headaches... Maybe it is easier to explode the blocks with an undo mark, collect the info and do an undo....

Title: Re: Finding objects inside INSERT/BLOCK
Post by: Lee Mac on May 13, 2013, 04:29:29 PM
Our blocks are often nested, gives me headaches...

This program may help you with the matrix transformations: Extract Nested Block (http://lee-mac.com/extractnestedblock.html), the key is gile's refgeom function.
Title: Re: Finding objects inside INSERT/BLOCK
Post by: Woabow on May 14, 2013, 11:39:59 AM
Thanks Lee, Ill give it a try.