;;;Change the width of a selected set of polylines as a group ;;;with only one command sequence. ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 7-22-91 ;;;> EDITED: 04-08-1997 ;;; (defun C:CPLW (/ othlyr nthlyr opw cthlyr gpna gpnl chgpnt lthlyr gpname gpne tch D) (SETVAR "CMDECHO" 0) (COMMAND "HANDLES" "ON") (princ "\nSelect polylines for width change: ") (setq gpna (ssget)) (if gpna (progn (setq nthlyr (getreal "Enter width: ")) (setq lthlyr (getvar "CLAYER")) (setq cthlyr "bylayer") (setq gpnl 0) (setq tch 0) (setq gpname (sslength gpna)) (While (< gpnl gpname) (if (= "LINE" (cdr (assoc 0 (setq gpne (entget (ssname gpna gpnl)))))) (progn (setq D (cdr (CAR gpne))) (command "change" D "" "p" "layer" lthlyr "c" cthlyr "") (command "pedit" D "" "w" nthlyr "") ) ) (if (= "ARC" (cdr (assoc 0 (setq gpne (entget (ssname gpna gpnl)))))) (progn (setq D (cdr (CAR gpne))) (command "change" D "" "p" "layer" lthlyr "c" cthlyr "") (command "pedit" D "" "w" nthlyr "") ) ) (if (= "POLYLINE" (cdr (assoc 0 (setq gpne (entget (ssname gpna gpnl)))))) (progn (setq othlyr (cdr (setq as (assoc 40 gpne)))) (setq othlyr nthlyr) (setq gpne (subst (cons 40 othlyr) as gpne)) (entmod gpne) (setq opw (cdr (setq as (assoc 41 gpne)))) (setq opw nthlyr) (setq gpne (subst (cons 41 opw) as gpne)) (entmod gpne) (setq othlyr (cdr (setq as (assoc 8 gpne)))) (setq othlyr Lthlyr) (setq gpne (subst (cons 8 Lthlyr) as gpne)) (entmod gpne) (setq othlyr (cdr (setq as (assoc 62 gpne)))) (setq othlyr cthlyr) (setq gpne (subst (cons 62 cthlyr) as gpne)) ) ) (setq gpnl (1+ gpnl)) ) )) (SETQ TCH GPNL) (princ "Changed ")(princ tch)(princ " polyline widths.") (setq chgpnt nil gpna nil gpnl nil nthlyr nil lthlyr nil othlyr nil) (terpri) )