x좌표를 R값이 아닌 파이 값으로 뽑고 싶은데
어떻게 수정을 하면 될까요>? 고수분들 도와주세요~!
그리고 좌표로 뽑을때 칸안에 생성되도록 할수는 없나요?
표로 만들어 지도록 말이죠
수정 부탁드립니다!
;*******************************************
; Program : Number & Coordinate
; By Suk-Jong Yi
; 1995. 2. 3.
;*******************************************
;사용자의 편의을 위해 내용을 조금변경씩힌 원본이 아닙니다
;변경일 2002.11.25 손아무게
;*************
; Main program
;*************
(DEFUN c:NE()
(defun SETERR(s)
(if (/= s “Function cancelled”)
(princ (strcat “nError: ” s))
); of If
(setq *error* oer seterr nil)
(princ)
); of SETERR
(setq oer *error* *error* seterr)
(setq lp (getvar “LUPREC”))
(setvar “cmdecho” 0)
(setq sn (getint “노력!!
시작 번호? <1>: “))
(if (= sn nil) (setq sn 1))
(setq txts (getvar “textsize”))
(princ “글자 크기? <“)
(princ txts)
(setq txth (getdist “>: “))
(terpri)
(if (= nil txth) (setq txth txts))
(setq sf (getreal “좌표에 대한 축척? <1.0>: “)) ;scale factor럼력
(if (= sf nil) (setq sf 1.0))
(setq lc (getpoint “좌표표기 위치 지정 “))
(terpri)
(setq num sn)
;*** Question file writing
;1(initget “Yes No”)
;2(setq ans (getkword “파일 저장?(Yes/No)<N>: “))
;3(if (= ans “Yes”)
;4 (progn
; get file name
; (setq fn (getstring “Enter file name :”))
;5 (setq fn (getfiled “Open data file” “” “dat” 1))
;*** check exist file
;6 (if (findfile fn)
;7 (progn
;8 (princ “nFile allready exist, “)
;9 (initget 1 “OverWrite Append”)
;10 (setq ansOA (getkword “OverWrite / Append: “))
;11 (cond
;12 ((= ansOA “OverWrite”) (setq opf (open fn “w”)))
;13 ((= ansOA “Append”) (setq opf (open fn “a”)))
;14 ); of cond
;15 ); of progn
;*** open write file (if file isn’t exist)
;16 (setq opf (open fn “a”))
;17 ); of if
;18 ) ; End prog
;19 nil
;20) ; End if
(setq count 1)
(princ “nPoint# “)
(princ num)
(while
;*** get node point
(setq pnt (getpoint ” Pick point: “))
(setq pntx (car pnt))
(setq pnty (cadr pnt))
(setq pntz (caddr pnt))
;*** integer to number
(setq txt (itoa num))
;*** get number text position
(setq pnt1x (+ pntx txth))
(setq pnt1y (+ pnty txth))
(setq pnt1 (list pnt1x pnt1y))
;*** draw number text
(command “text” “j” “m” pnt1 txth “” TXT)
(terpri)
;*** get coord text
(setq pxy (strcat txt ” Y” (rtos (* pnty sf) 2 lp)
” X” (rtos (* pntx sf) 2 lp)))
;(princ pxyf opf)
(if (= ans “Yes”)
(progn
; Write File (ans = “Yes”)
;*** get coord text to write file
(setq pxyf (strcat txt ” ” (rtos (* pnty sf) 2 lp)
” ” (rtos (* pntx sf) 2 lp)
” ” (rtos (* pntz sf) 2 lp)))
(write-line pxyf opf)
;(princ “coord= “)
;(princ pxyf)
) ; End then
) ; End if
;*** get coord text position
(setq cpy (- (cadr lc) (* count (* 1.5 txth))))
(setq cpx (car lc))
(setq cpxy (list cpx cpy))
;*** draw coord text
(command “text” cpxy txth “” pxy)
(terpri)
(setq num (+ num 1))
(setq count (+ count 1))
(princ “Point# “)
(princ num)
) ; of while
(if (= ans “Yes”)
(close opf)
) ;End if
(setq *error* oer seterr nil)
(princ)
);;; End of Program