제가 사용하는 r치수와 원치수 리습입니다.
근데 리습에 문제점이 있어 문의드립니다 ..
명령어입력후에 원또는 arc를 클릭하면 각도치수기입을 하는데
만약 실수로 원이 아닌 다른객체(ex:선) 등등을 클릭하면 치수기입이 되지않습니다 …
객체선택하는단계에서 무조건 원이나 호만 선택이 되도록 수정될수 있을까요 ?
도움부탁드립니다..
감사합니다
(defun c:DE (/ *error*) ;원치수
(defun *error* (msg)(princ “error: “)
(princ msg)
(command “undo” “e”)
(princ)
)
(command “undo” “GROUP”)
(command “DIMDIAMETER”)
(while (progn (setvar ‘ERRNO 0) (princ “n호 또는 원 선택:”) (command pause) (= (getvar ‘ERRNO) 7)))
(if (= (getvar ‘ERRNO) 0)
(progn
(princ “n치수선 위치 지정”)
(command pause)
(command “change” “l” “” “p” “la” “DIM” “”)
(command “undo” “e”)
)
(command nil)
)
(command nil)
(princ)
) ;Defun end
(defun c:DR (/ *error*) ;반지름치수
(defun *error* (msg)(princ “error: “)
(princ msg)
(command “undo” “e”)
(princ)
)
(command “undo” “GROUP”)
(command “DIMRADIUS”)
(while (progn (setvar ‘ERRNO 0) (princ “n호 또는 원 선택:”) (command pause) (= (getvar ‘ERRNO) 7)))
(if (= (getvar ‘ERRNO) 0)
(progn
(princ “n치수선 위치 지정”)
(command pause)
(command “change” “l” “” “p” “la” “DIM” “”)
(command “undo” “e”)
)
(command nil)
)
(command nil)
(princ)
) ;Defun end