Jump to content

AutoLISP program for grouping


DubanGal

Recommended Posts

rectangle.jpgGood afternoon Everyone,

 

I have to do a project on AutoLISP and I'm new programming on this. Please help me with some recommendations about how to start and where I can find some tutorials for that.

rectangle.jpg

I have a lot of polylines with the form of a rectangle. I want to do a program able to group them below certain parameters such as:

 

-Distance between one polyline and other.

-Area the rectangle have.

 

I receive all your comments.

 

Thank you.

Link to comment
Share on other sites

Perhaps THIS ?

 

No, Let's say I have a lot of rectangles that are not necessarily one next to the other. I just have a lot of them in the drawing and I need to group based on the conditions I mentioned before.

 

It is a good idea to group them that way, but it could be just drawing a circle that encloses them.

 

Thank you.

Link to comment
Share on other sites

Here is a real quick answer to one of your questions. just google Vl lisp commands.

 

(setq obj (vlax-ename->vla-object (car (entsel "\nPick "))))
(alert (strcat "The area is " (rtos (vla-get-area obj) 2 2)))

 

The distance between two plines is a little more complicated a simple do they touch is "VLA-intersectwith obj1 obj2" returns true if the touch. Will leave closestpointto to another, bit of a hint there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...