AutoCAD 2014 VBA

AutoCAD 2014 VBA

Anonymous
Not applicable
1,319 Views
2 Replies
Message 1 of 3

AutoCAD 2014 VBA

Anonymous
Not applicable

Problem: looking for the shortest line between a point and a collection of other lines

Is there a VBA solution for such a problem? I could start concentric circles form the point until they intersect with a line but I am wondering if a solution already exists, thanks. 

0 Likes
1,320 Views
2 Replies
Replies (2)
Message 2 of 3

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

I would go through all lines, calculate the shortest vector

  • your point to a point vertical to your line
  • in case the calculated vertical is not on the line (between line's start- and endpoint), then the closer endpoint

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 3

Anonymous
Not applicable

you may want to give more info/examples about your goal and starting data

0 Likes