更改代码中的线型和颜色以满足您的需要。
- (defun c:Test (/ lt cl l e)
- ;; Tharwat 19.Sep.2013 ;;
- (setq lt "DASHED" ;; LineType ;;
- cl 3 ;; Color number ;;
- )
- (if (not (tblsearch "LTYPE" lt))
- (vla-load
- (vla-get-Linetypes
- (vla-get-ActiveDocument
- (vlax-get-acad-object)
- )
- )
- lt
- "acadiso.lin"
- )
- )
- (while (setq l (tblnext "LAYER" (null l)))
- (if (wcmatch (cdr (assoc 2 l)) "contour*")
- (progn
- (setq e (entget (tblobjname "LAYER" (cdr (assoc 2 l))))
- e (subst (cons 62 cl) (assoc 62 e) e)
- e (subst (cons 06
- (if (and lt (tblobjname "ltype" lt))
- lt
- "Continuous"
- )
- )
- (assoc 06 e)
- e
- )
- )
- (entmod e)
- )
- )
- )
- (princ)
- )
- (vl-load-com)
|