请看这里:-
- (defun c:test ()
- (command "-linetype" "_Load" "Dashed" "acad.lin" "" "")
- (vlax-for item (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
- (vl-some '(lambda (x)
- (if (eq (car x) (vla-get-name item))
- (progn
- (vla-put-name item (strcat (car x) " - " (cadr x)))
- (vla-put-description item (cadr x))
- (vla-put-linetype item (caddr x))
- (vla-put-lineweight item (cadddr x))
- (vla-put-color item (last x))
- )
- )
- )
- '(("G8010001" "Building outline" "CONTINUOUS" "200" 1)
- ("G8010004" "Building outline (overhead)" "DASHED" "200" 1)
- ("G8010007" "Civil parish or community boundary" "CONTINUOUS" "200" 6)
- ("G8010008" "District London borough or unitary authority undary" "CONTINUOUS" "200" 6)
- ("G8010009" "County boundary" "CONTINUOUS" "200" 6))
- )
- )
- (princ)
- )
|