(defun c:EL(/ ip ent)
(graphscr)
(setvar "cmdecho" 0)
(setq ip (getreal "1,2,3,4,5,6,7,8,9,0,00,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,34,35,36,37, @ Eress하고픈 LAYER 이름이 뭐여 ?:"))
(if (eq ip 1)(setq ip "l-die"))
(if (eq ip 2)(setq ip "l-die-dash"))
(if (eq ip 3)(setq ip "u-die"))
(if (eq ip 4)(setq ip "u-die-dash"))
(if (eq ip 5)(setq ip "pad"))
(if (eq ip 6)(setq ip "pad-dash"))
(if (eq ip 7)(setq ip "l-steel"))
(if (eq ip 8)(setq ip "l-steel-dash"))
(if (eq ip 9)(setq ip "u-steel"))
(if (eq ip 0)(setq ip "u-steel-dash"))
(if (eq ip 12)(setq ip "cam"))
(if (eq ip 13(setq ip "cam-dash"))
(if (eq ip 14)(setq ip "cam-unit"))
(if (eq ip 15)(setq ip "heel"))
(if (eq ip 16)(setq ip "heel-dash"))
(if (eq ip 17)(setq ip "post"))
(if (eq ip 18)(setq ip "post-dash"))
(if (eq ip 19)(setq ip "part"))
(if (eq ip 20)(setq ip "part-no"))
(if (eq ip 21)(setq ip "panel"))
(if (eq ip 23)(setq ip "panel-view"))
(if (eq ip 24)(setq ip "sechion"))
(if (eq ip 25)(setq ip "shion-dash"))
(if (eq ip 26)(setq ip "auto"))
(if (eq ip 27)(setq ip "auto-dash"))
(if (eq ip 28)(setq ip "air"))
(if (eq ip 29)(setq ip "dim"))
(if (eq ip 30)(setq ip "dim-h"))
(if (eq ip 31)(setq ip "center"))
(if (eq ip 32)(setq ip "core"))
(if (eq ip 34)(setq ip "std"))
(if (eq ip 35)(setq ip "std-dash"))
(if (eq ip 36)(setq ip "std1"))
(if (eq ip 37)(setq ip "std1-dash"))
(setq ent (ssget (list (cons 8 ip))))
(command "ERASE" ent "")
(princ)
);defun
상기와 같이 했더니 1~0번까지는 잘되는데요.
12번 부터는 안되네요
여기에도 숨은 사연이 있나요
번번이 죄송스럽지만 한수 부탁드립니다.
(defun c:EL()
(graphscr)
(setvar "cmdecho" 0)
(setq ip (getreal "1,2,3,4,5,6,7,8,9,0,00,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,34,35,36,37, @ Eress하고픈 LAYER 이름이 뭐여 ?:"))
(if (eq ip 1)(setq ip "l-die"))
(if (eq ip 2)(setq ip "l-die-dash"))
(if (eq ip 3)(setq ip "u-die"))
(if (eq ip 4)(setq ip "u-die-dash"))
(if (eq ip 5)(setq ip "pad"))
(if (eq ip 6)(setq ip "pad-dash"))
(if (eq ip 7)(setq ip "l-steel"))
(if (eq ip 8)(setq ip "l-steel-dash"))
(if (eq ip 9)(setq ip "u-steel"))
(if (eq ip 0)(setq ip "u-steel-dash"))
(if (eq ip 12)(setq ip "cam"))
(if (eq ip 13)(setq ip "cam-dash"))
(if (eq ip 14)(setq ip "cam-unit"))
(if (eq ip 15)(setq ip "heel"))
(if (eq ip 16)(setq ip "heel-dash"))
(if (eq ip 17)(setq ip "post"))
(if (eq ip 18)(setq ip "post-dash"))
(if (eq ip 19)(setq ip "part"))
(if (eq ip 20)(setq ip "part-no"))
(if (eq ip 21)(setq ip "panel"))
(if (eq ip 23)(setq ip "panel-view"))
(if (eq ip 24)(setq ip "sechion"))
(if (eq ip 25)(setq ip "shion-dash"))
(if (eq ip 26)(setq ip "auto"))
(if (eq ip 27)(setq ip "auto-dash"))
(if (eq ip 28)(setq ip "air"))
(if (eq ip 29)(setq ip "dim"))
(if (eq ip 30)(setq ip "dim-h"))
(if (eq ip 31)(setq ip "center"))
(if (eq ip 32)(setq ip "core"))
(if (eq ip 34)(setq ip "std"))
(if (eq ip 35)(setq ip "std-dash"))
(if (eq ip 36)(setq ip "std1"))
(if (eq ip 37)(setq ip "std1-dash"))
(setq ent (ssget "x" (list (cons 8 ip))))
(command "ERASE" ent "")
(princ)
);defun
이거 고대로 복사해서 사용하세여… 님께서 올려주신 리습에는 그렇게 킅문제
는 없는데… ip 13 에서 괄호가 한개빠졌네여..글고 마지막에 "x" 하고여..
그리고 담부터 이런리습 올려주실때는 sample파일도 같이 올려주세여..
할때마다 레이어 만들어서 시험할려니…..저도 시간이 쫌 걸리네여..