Repeat Dist Command is a new twist on the familiar Distance command in AutoCAD. The LISP command function Sum_Dist repeats the Dist command using the object snap Nea (near) for the first point and Per (perpendicular) for the second point. Given the two input points, the program displays an alert box containing the current distance, a running total, and number of the distances selected. After the alert box is closed, the loop repeats until an invalid distance entry is made or until you use the Esc key to exit. Each time the routine is restarted, the cumulative distance value is reset to zero. |