|
Hello,
It's my first with you, I am a beginner
I programmed this lisp to create text (X, Y) where Y is a value that must consider a real value (PC) and I transform it to a string with the rtos function (setq B(rtos (PC))).
The problem is: when I want to create the text according to the expression (setq ptcoord (strcat x "/" B))) it does not accept the string B
someone can help me solve this problem?
****************
(defun c:CFE (/ P1 x y ptcoord PC AXE ss PO pt)
; Definition Intersection
(setq PC (getreal "\nPC\n"))
(if (and (setq ss (ssget '(( 0 . "LINE,LWPOLYLINE"))))
(= 2 (sslength ss))
(setq int (vLa-intersectwith (vLax-ename->vLa-Object (ssname ss 0))
(vLax-ename->vLa-Object (ssname ss 1))
acextendnone))
(setq PO (vLax-safearray->List (vLax-variant-vaLue int))))
(repeat (/ (length PO) 3)
(setq pt (list (car PO) (cadr PO) (caddr PO)))
(command "_.POINT" pt) "")
)
(while
(setq P1 (getpoint "\Point Fe: "))
(setq x (rtos (- (car P1) (car PO)) 2 4))
(setq y (rtos (- (cadr P1) (cadr PO)) 2 4))
(setq B (rtos (PC) 2 4))
(setq ptcoord (strcat x "/" B))
(setq ptxt (list (car P1) (cadr PO)))
(command "_MTEXT" ptxt "R" 100 "S" "Legend" "H" 5 "L" 20 ptcoord "")
)
)
***************
Thank you. |
|