VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Measure length of point on polyline from start point

6 REPLIES 6
Reply
Message 1 of 7
nritchie
337 Views, 6 Replies

Measure length of point on polyline from start point

I would like to find the length of a polyline from the start point of the polyline to a point on the polyline picked by the user.

I had a program that worked fine in Autocad 2002 which used the Curve.cls v1.3 and VLAX.CLS v1.4 from acadx.com. Now in Autocad 2006 my program does not work.

I could post code if that helps.
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: nritchie

In the VLAX.cls change the line that reads VL.APPLICATION.1
to VL.APPLICATION.16

wrote in message news:5344188@discussion.autodesk.com...
I would like to find the length of a polyline from the start point of the
polyline to a point on the polyline picked by the user.

I had a program that worked fine in Autocad 2002 which used the Curve.cls
v1.3 and VLAX.CLS v1.4 from acadx.com. Now in Autocad 2006 my program does
not work.

I could post code if that helps.
Message 3 of 7
nritchie
in reply to: nritchie

Wow. That is fixed everything. Thank you so much!

I understand the rest of my code except for those two modules listed above. I would appreciate it if you could provide a short explanation of why that worked. If not thank you anyway for your time in providing a solution.
Message 4 of 7
Anonymous
in reply to: nritchie

The VL application is the VisualLisp API provided by Autodesk. In Acad
R2000-2002 the actual version is 15.* but the VL version was 1, in Acad
2004-2006 the VL was changed to 16 so that it matched the Acad version it
was to be used with. Acad2007 is version 17.0 but, oddly, they left VL at
16.....

You're welcome!

wrote in message news:5344274@discussion.autodesk.com...
Wow. That is fixed everything. Thank you so much!

I understand the rest of my code except for those two modules listed above.
I would appreciate it if you could provide a short explanation of why that
worked. If not thank you anyway for your time in providing a solution.
Message 5 of 7
gwilliams
in reply to: nritchie

You have working code that does that!!! Could you post it? That is exactly what I am needing to do.

Thanks,
George.
Message 6 of 7
saluki
in reply to: nritchie

I'll second that, if you could post the code that would be great.
Message 7 of 7
nritchie
in reply to: nritchie

Ok, It's kind of rough but it works. Main procedure is in Macros module. There are some constants you can define at the beginning of that module.

The procedure prints to command line. See commented lines in procedure to add text at point or assign value to attribute.

Let me know if you need any more explanation or have suggestions.

Nate

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

Post to forums  

Autodesk Design & Make Report

”Boost