Command: AQ
Select objects: 1 found
Select objects:
텍스트 높이 입력 <15.0>:
현재 소숫점 자리수 :<2> : 원하는 소숫점 자리수 입력하세요, 원치 않으면 그냥 엔터를 치세요 :
Text가 입력될 위치에 Click 하세요 :; error: no function definition: DTR
어느부분이 수정되야되는지 모르겟습니다.
(defun c:a( / doc space ss index obj mi mx minpt maxpt inspt area txtobj )
(setvar “cmdecho” 0)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(cond
((= (vla-get-activespace doc) 1) (setq space (vla-get-modelspace doc)))
((= (vla-get-activespace doc) 0) (setq space (vla-get-paperspace doc)))
)
(if (setq ss (ssget (list (cons 0 “CIRCLE,ARC,*POLYLINE,LINE,ELLIPSE,SPLINE”))))
(if (or (setq ts (getreal (strcat “n텍스트 높이 입력 <” (vl-princ-to-string (getvar “textsize”)) “>:”))) (setq ts (getvar “textsize”)))
(progn
(if (= ds nil)
(setq ds 1))
(setq str (strcat “nt현재 소숫점 자리수 :<” (rtos ds 2 2) “> : 원하는 소숫점 자리수 입력하세요, 원치 않으면 그냥 엔터를 치세요 : “))
(setq buf (getint str))
(if (= buf NIL)
(setq buf ds)
(setq ds buf)
)
(setvar “textsize” ts)
(setq index 0)
(repeat (sslength ss)
(setq obj (vlax-ename->vla-object (ssname ss index)))
(vla-getboundingbox obj ‘mi ‘mx)
(setq minpt (vlax-safearray->list mi) maxpt (vlax-safearray->list mx))
(setq inspt (polar minpt (angle minpt maxpt) (/ (distance minpt maxpt) 2)))
(setq inspt (list (car inspt) (+ (cadr inspt) (* ts 2))))
(setq area (vla-get-area obj)) ;len (vlax-curve-getdistatparam obj (vlax-curve-getendparam obj)))
(setq a “면적(㎡) : ” b (rtos (/ area 1.) 2 2) )
(setq p (vlax-3d-point (getpoint “출력 포인트 선택:”)))
(setq txtobj (vla-addtext space b p ts))
;(setq txtobj (vla-addtext space (strcat a b) p ts))
(vla-put-alignment txtobj 4)
(vla-put-textalignmentpoint txtobj p)
(setq inspt (polar inspt (/ (* 270 pi) 180) (* ts 2)))
(setq index (1+ index))
)
;(command “chprop” (ssget “x” ‘((0 . “TEXT”) (1 . “평*”))) “” “c” “7” “”)
)
)
)
(princ)
)
(vl-load-com)
(prompt “n[ AQ ]”) ;; 여기를 수정하시면 리습로드시 명령어가 나옵니다 ^^;;
(princ)
고맙습니다.^^.gif)