선택한 객체의 색상번호를 알아내서 다른 색상으로 바꾸는 리습 수정부탁합니다.
(defun C:test(/ !Sel !Layer !Color)
(setq !Sel (entsel “n기본 객체 선택: “))
(setq !Color (getint “n변경할 색상 번호: “))
(setq !Ent (entget (car !Sel)))
(setq !layer (cdr (assoc 8 !Ent)))
(setq !c (tblsearch “layer” !layer))
(setq !a (cdr (assoc 62 !c)))
(setq !Sel (ssget “x” (list (cons 62 !a))))
(command “chprop” !Sel “” “c” !Color “”)
공유