예전에는
(defun C:1c (/ A)
(IF (/= a nil)
(COMMAND “CHPROP” A “” “la” “1e” “C” “BYLAYER” “LT” “BYLAYER” “” )
)
)
이런식으로 해서 레이어가 생성 되고 오브젝트 클릭시 그 오브젝트가 위의 레이어로 변경되었습니다.
이번에 리습 전체를 다른걸로 바꾸면서 단축키가 사용이 안되는데 혹시 살려주실분 계신가요?
찾고 찾다가 아래의 리습을 발견했습니다.
;;=====================================================================
; 레이어 생성
; ->실행후 111 명령하면 레이어 자동 생성
; ->여기 설정에서 레이어 이름 및 색상 변경 가능
;;—— quick area —————————————————
(defun c:111()
(setvar “cmdecho” 0)
(if (= (tblsearch “layer” “Z”) nil)
(command “layer” “m” “Z” “c” “9” “” “lt” “CENTER” “” “”))
(if (= (tblsearch “layer” “EF”) nil)
(command “layer” “m” “EF” “c” “3” “” “lt” “continuous” “” “”))
(if (= (tblsearch “layer” “MF”) nil)
(command “layer” “m” “MF” “c” “1” “” “lt” “continuous” “” “”))
(if (= (tblsearch “layer” “ETC”) nil)
(command “layer” “m” “ETC” “c” “5” “” “lt” “continuous” “” “”))
(princ)
)
(defun c:1()
(ssget)
(command”LAYER” “S” “Z” “”)
(command “chprop” “p” “” “la” “Z” “”)
)
(defun c:2()
(ssget)
(command”LAYER” “S” “EF” “”)
(command “chprop” “p” “” “la” “EF” “”)
)
(defun c:3()
(ssget)
(command”LAYER” “S” “MF” “”)
(command “chprop” “p” “” “la” “MF” “”)
)
(defun c:4()
(ssget)
(command”LAYER” “S” “ETC” “”)
(command “chprop” “p” “” “la” “ETC” “”)
)
(princ)
(defun c:11() (command “-layer” “s” “Z”^C^C) (princ) );현재레이어를 “Z” 으로 변경
(defun c:22() (command “-layer” “s” “EF”^C^C) (princ) );현재레이어를 “EF” 으로 변경
(defun c:33() (command “-layer” “s” “MF”^C^C) (princ) );현재레이어를 “MF” 으로 변경
(defun c:44() (command “-layer” “s” “ETC”^C^C) (princ) );현재레이어를 “ETC” 으로 변경
여기 리습중 레이어를 111을 치고 1을 쳐야만이 라인의 레이어를 변경할수가 있는데
이 두개를 합성해서 쓸수는 없을까요 ?
답변좀 부탁드립니다. ^^