If youve ever tried the DIVIDE command on a Poly Line, You know the frustration that usually follows that adventure. Here is a great Routine that allows you to easily do this task.
Note that places “Points” as the division markers like the Divide command. So set your Point size and style with the command DDPTYPE prior to running this routine. It does not actually divide the polyline but rather marks the divisions with points. Also Note that this routine asks you to pick 2 points along the poly line, so this routine only works on straight segments of polylines. Then Specify the number of segments, not the number of points.
- DIVSIDE <enter>
- Specify first point along poly line
- Specify second point along poly line
- Specify number of segments between the 2 picked points.
;divide a side of a polyline into segments ;by Thawart found at autocad forums. (defun c:divside (/ p1 p2 v l pt) (if (and (setq p1 (getpoint "\n Specify first point :")) (setq p2 (getpoint p1 "\n Specify Second point :")) (setq v (getint "\n Specify number of segments :")); changed "division points" to "segments" ) (progn (if (eq (getvar 'pdmode) 0) (setvar 'pdmode 3) ) (setq l (/ (distance p1 p2) v)) (repeat (- v 1) (setq pt (polar p1 (angle p1 p2) l)) (entmakex (list (cons 0 "POINT") (cons 10 pt))) (setq p1 pt) ) ) (princ) ) (princ) )