Visual Basic Customization

Visual Basic Customization

Reply
Active Contributor
nritchie
Posts: 30
Registered: ‎08-05-2005
Message 1 of 7 (123 Views)

Measure length of point on polyline from start point

123 Views, 6 Replies
09-28-2006 09:30 AM
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.
*Jeff Mishler
Message 2 of 7 (123 Views)

Re: Measure length of point on polyline from start point

09-28-2006 09:45 AM 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.
Active Contributor
nritchie
Posts: 30
Registered: ‎08-05-2005
Message 3 of 7 (123 Views)

Re: Measure length of point on polyline from start point

09-28-2006 10:21 AM 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.
*Jeff Mishler
Message 4 of 7 (123 Views)

Re: Measure length of point on polyline from start point

09-28-2006 11:00 AM 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.
Active Contributor
gwilliams
Posts: 44
Registered: ‎04-28-2003
Message 5 of 7 (123 Views)

Re: Measure length of point on polyline from start point

10-24-2006 07:20 PM 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.
Distinguished Contributor
saluki
Posts: 188
Registered: ‎09-18-2005
Message 6 of 7 (123 Views)

Re: Measure length of point on polyline from start point

10-25-2006 05:49 AM in reply to: nritchie
I'll second that, if you could post the code that would be great.
Active Contributor
nritchie
Posts: 30
Registered: ‎08-05-2005
Message 7 of 7 (123 Views)

Re: Measure length of point on polyline from start point

10-25-2006 07:50 AM 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.