;;;Moss Designs ;;;www.mossdesigns.com ;;;July 2006 ;;;this command breaks a line and changes linetype, layer, and color (defun c:chl () ; first get first breaking point ; get the current osnap settings (setq os-data (getvar "osmode")) ; set osnap to intersection (setvar "OSMODE" 32) ; get first break point (prompt "\nSelect first break point") (setq pt1 (getpoint)) ;pt1 must be just x,y no z (setq pt1x (car pt1)) (setq pt1y (cadr pt1)) (setq pt1a (list pt1x pt1y)) ;get line to break (prompt "\nSelect line outside change area") (setq obj (car (entsel))) (command "._break" obj pt1a "@") ;get the next point (prompt "\nSelect second break point") (setq pt2 (getpoint)) ;pt must be just x,y no z (setq pt2x (car pt2)) (setq pt2y (cadr pt2)) (setq pt2a (list pt2x pt2y)) ;get line to break again then change (prompt "\nSelect line inside change area") (setq obj (car (entsel))) (command "._break" obj pt2a "@") ;get the source obj (prompt "\nSelect matchprop source object with desired properties:") (setq sobj (car (entsel))) ;next change properties (command "matchprop" sobj obj "") ;restore osnaps (setvar "osmode" os-data) (princ) ) ;end defun