Jump to content

vba - Grab the intersection point on the block or pline object


smiledays

Recommended Posts

Hey guys,

 

I wrote to ask for some help about the VBA coding in AutoCAD. I have some circles as well as some lines attached to the edge of each circle in my map. Now I'm supposed to extend the line to the center point of each circle. Since there are thousands of circles in the map, I'd like to use VBA macro to automatically extend the lines one by one.

 

My problem is that how can I grab the intersection point at each circle. I have no idea what command I can use to get the location of the intersection point.

 

The second problem is that some lines even don't rest on the edge of the circle. So I should grab the endpoint closest to each circle and change the right end point to the center of the circle. Is there anyway I can use VBA command to find the nearest endpoint?

 

Note: All the circles and lines are in the pline format.

 

Thanks a lot for your time to see my post. Any suggestions or codes will be highly appreciated!

Link to comment
Share on other sites

Please post a image or dwg etc so its a bit clearer to understand a before and after. A circle has a centre pt thats easy to find and making a vertice re pline go to center is again easy.

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...