고수님 리습 수정 부탁드입니다.
컨텐츠 정보
- 455 조회
- 2 댓글
- 0 추천
- 0 비추천
- 목록
본문
2007버전에서 사용하던 화면으로 위치 찾아주는 리습입니다.
(defun c:` (/ DwgFileFolder DwgFileList);;윈도우 중심점과 연계하기
(vl-load-com)
(setq fn (getvar "DWGPREFIX"))
(setq tit (open "c:\tmp.$$$" "w"))
(setq cwxy (getvar "VIEWCTR")) ;;뷰중심포인트
(setq cwsz (getvar "VIEWSIZE")) ;;뷰크기
(setq cwszy (/ cwsz 2.0))(setq cwszx (* cwszy 1.5))
;;뷰중심 계산
(setq ux (- (car cwxy) cwszx)) (setq uy (+ (cadr cwxy) cwszy))
(setq lx (+ (car cwxy) cwszx)) (setq ly (- (cadr cwxy) cwszy))
;(command "zoom" "w" (list ux uy) (list lx ly))
(write-line (strcat (rtos ux) "," (rtos uy)) tit) ;;좌상
(write-line (strcat (rtos lx) "," (rtos ly)) tit) ;;우하
(write-line (strcat (rtos (car cwxy)) "," (rtos (cadr cwxy))) tit) ;;중심점
(write-line (rtos cwsz) tit) ;;뷰크기
(close tit)
(print "중심점 저장됨..>뷰이동가능")
)
(defun c:" (/ DwgFileFolder DwgFileList);;윈도우 중심점과 연계하기
(vl-load-com)
(setq fn (getvar "DWGPREFIX"))
(setq tit (open "c:\tmp.$$$" "r"))
(setq uxy (read-line tit))
(setq lxy (read-line tit))
(setq cxy (read-line tit))
(setq siz (read-line tit))
(command "zoom" "w" uxy lxy)
(command "zoom" "c" cxy siz)
(close tit)
)