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