도면 작성 리습인데 다른 캐드 버전에서는 사용이 안됩니다.
컨텐츠 정보
- 181 조회
- 0 추천
- 0 비추천
-
목록
본문
2019 AUTO CAD 에서는 잘 실행이 되는데 2020 AUTO CAD에서는 오류가 발생합니다.
리습 한번 봐주시면 감사하겠습니다.
(defun c:nm40_200 ()
(getvar "cmdecho")
(setvar "cmdecho" 0)
;Turn OFF all layers
(command "_layer" "off" "*" "y" "")
;Delete unnecessary layers
(command "_laydel" "Name" "80″ "" "Yes" "")
;Alignment die details
;Set layers color
;Set layer objects to layer 0
(command "_layer" "on" "100″ "")
(command "_chprop" "w" "-13490,2410″ "-4510,11390″ "" "Color" "40″ "Layer" "SHEET5″ "")
(command "_chprop" "w" "4510,2410″ "13490,11390″ "" "Color" "40″ "Layer" "SHEET5″ "")
(command "erase" "w" "-4490,2410″ "4490,11390″ "")
;Die pad details
(command "_layer" "on" "60″ "")
(command "_layer" "on" "70″ "")
(command "_chprop" "w" "-4490,2410″ "4490,11390″ "" "Color" "7″ "Layer" "SHEET3″ "")
;Delete empty layers
(command "_layer" "off" "*" "y" "")
(command "_laydel" "Name" "100″ "" "Yes" "")
(command "_laydel" "Name" "60″ "" "Yes" "")
(command "_laydel" "Name" "70″ "" "Yes" "")
;Turn ON layer "SHEET5″
(command "_layer" "on" "SHEET5″ "")
(command "_layer" "on" "Template" "")
;Scale objects to fit template
(setq tdie (+ die 20))
(setq adsfactor1 (/ 1600 tdie))
(setq adsfactor2 (/ 1600 die))
(command "_scale" "w" "-13490,2410″ "-4510,11390″ "" "-9000,6900″ adsfactor1)
(command "_scale" "w" "4510,2410″ "13490,11390″ "" "9000,6900″ adsfactor1)
;Move to template locations
(command "_move" "w" "-13490,2410″ "-4510,11390″ "" "-9000,6900″ "-2600,1600″)
(command "_move" "w" "4510,2410″ "13490,11390″ "" "9000,6900″ "2600,1600″)
;Turn ON layer "SHEET3″
(command "_layer" "on" "SHEET3″ "")
;Scale die pad reference object to fit template
(command "_scale" "w" "-4490,2410″ "4490,11390″ "" "0,6900″ adsfactor2)
;Move die pad reference to template locations
(command "_move" "w" "-4490,2410″ "4490,11390″ "" "0,6900″ "2600,1600″)
;Delete templates
(command "_laydel" "Name" "Template" "" "Yes" "")
(command "zoom" "extents")
(command "_layer" "on" "*" "")
(getvar "cmdecho")
(setvar "cmdecho" 1)
)