Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Array within a boundary

5 REPLIES 5
Reply
Message 1 of 6
KielT
2347 Views, 5 Replies

Array within a boundary

I'm looking to array blocks within a boundary. I'm not even sure how to approach or begin developing something along these lines.

Thoughts:
- perform a normal array, but select a boundary afterward which determines the limit for blocks that are kept; blocks with insertion points outside defined boundary are deleted.

Logic is something like this:
- select block
- pick lower left [insertion] point
- specify array parameters
- select boundary
- finish.

Thanks for the help. -- KT
5 REPLIES 5
Message 2 of 6
Jroper
in reply to: KielT

Do you have AutoCAD 2006 or higher? Sounds like it could be a dynamic block candidate. Would that work?
Message 3 of 6
KielT
in reply to: KielT

I'm using AutoCAD 2009 [and 2008 alternatively]. Using a dynamic block would work and would be great, how do you suggest I go about putting something like this together? -- KT
Message 4 of 6
Jroper
in reply to: KielT

The best thing to do is look at an example that is close and try to suit it to your needs. Check AutoCAD's sample folder. Also talk to the folks on the forum here on Discussion Groups dedicated to Dynamic Blocks. And I ran across this helpful pdf with a google search. Check out page 6.

http://www.cadmasters.com/class/ACAD2006DynamicBlocks2.pdf

I've never done an array function myself.
Message 5 of 6
KielT
in reply to: KielT

Thanks for the information, but the problem still arises when the area to be populated is not rectangular. The problem is even worse when an arc is introduced into the boundary. -- KT
Message 6 of 6
Anonymous
in reply to: KielT


Hi, here's my two cents:

 

For non-rectangular areas, try to get the bounding
box of the boundary. This would reduce the problem to only one situation to
deal with. Further on, if you want to remove the instances that are physically
outside the boundary (could have the insertion point inside though), then use
your boundary as a crossing polygon and delete all the instances of the
block that are outside your boundary (use ssget with a filter, in order to
select all the instances of that block).

 

If you want to remove all instances that have
the insertion point outside the boundary (there could be instances that are
inside the boundary), then you will have to use a function that checks if a
point (in our case the insertion point) is inside a certain area and if not,
remove that instance. Such a function was already published on this forum and it
won't be hard to find and to implement.

 

HTH


--
Humans are born with a wide
horizon.
As time goes by, the horizon narrows and
narrows, until it
becomes a point of view.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Thanks
for the information, but the problem still arises when the area to be
populated is not rectangular. The problem is even worse when an arc is
introduced into the boundary. -- KT

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost