[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Distance Along a Polyline
Tip# 2181 By Pedro Ferreira On 01-Feb-2007
Rated By 1 users Downloaded : 683
Categories : Object Data
Software type : AutoCAD
Rename File To : Tip 2181: ds.LSP
Select a point on a polyline; function reports distance into the polyline and polyline layer back to the AutoCAD text screen.

Pedro Ferreira also provided a nice introduction to the power of Visual LISP object manipulation with Distance Along a Polyline (Tip #2181). Hidden in the VL functions of Visual LISP are the VLAX functions, a powerful set of tools that let you directly access objects inside AutoCAD and other places. One gem in the treasure chest is the VLAX-CURVE-GETDISTATPOINT function (what a mouthful). Pedro's function cleverly demonstrates how this function and others work. To use it, just load the LISP code and type DS at the Command line. Select a point somewhere along a polyline and the function reports the distance into the polyline, as well as the layer of the polyline, back to the AutoCAD text screen.



Average Rating:

User comments

Log In