ONE YEAR AND 196 POSTS!!!!
One year ago today, I started this blog in hopes to have reference for AutoCAD tips in case I forgot them. After one year, I have made 196 posts and every week more and more people come to this blog and hopefully find a few good tips. Thanks for making my blogging experience fun and may there be many more helpful posts!!!
Here is a simple routine that lets you pick up where you left off. You simply pick the end of an existing polyline, and this routine will let you pick more points (add more vertices) to that polyline. This routine continues even the properites as well…
- SWPOLY <enter> to start
- Select a part of a polyline that is near its endpoint.
- You may need to specify what endpoint you want to continue from
- Click to place more vertices
(defun C:SWPOLY (/ dat c elst wid ename pend pt) (vl-load-com) (setvar "cmdecho" 0) (setq plw (getvar "plinewid")) (if (and (setq dat (entsel "\nSelect source polyline: ")) (wcmatch (cdadr (setq elst (entget (setq ename (car dat))))) "*POLYLINE*")) (progn (setq wid (cdr (assoc 40 elst))) (prompt (strcat "\nWidth is " (rtos wid))) (setq pend (osnap (cadr dat) "_end")) (setq pt (cond ((equal (vlax-curve-getstartpoint ename) pend 0.0001) (vlax-curve-getstartpoint ename)) ((equal (vlax-curve-getendpoint ename) pend 0.0001) (vlax-curve-getendpoint ename)) (t nil))) (if pt (setq p pt) (setq p (getpoint "\nSpecify start point: "))) (command "_.pline" p "_w" wid wid) (while (eq 1 (logand 1 (getvar "cmdactive"))) (command pause)) (if (and pt (wcmatch (cdadr (entget (entlast))) "*POLYLINE*")) (command "_.pedit" ename "_j" (entlast) "" ""))) (prompt "\nNot a polyline")) (if plw (setvar "plinewid" plw)) (setvar "cmdecho" 1) (princ)) (princ)