schwarz89it
Guest
good morning to all, I wrote a rudimentary function that in theory should allow me to quickly insert the "quotes" however when I arrive at the command line (command _text) the program does not properly perform the function.
I know that the most experienced of the group will tell me that it is not recommended to use command, but being at first arms, I have no particular claim to be 100% faithful to the language.
those I marked in red should be the values that should be inserted by the program, but in its place I get out of this writing:
I don't know what parameters to change.
Code:
(defunc c:altimetric ()
(setvar "cmdecho" 0)
(setq ps (getpoint "\point per line of writing points:"))
(setq p0 (getpoint "\report rate for calculation:"))
(setq htesto 2)
(sing)
(repeat 1)
(setq pt (getpoint "\point to be measured:"))
(setq y (- (cadr pt) (cadr p0))
(setq p1 (list (car pt) (cadr ps)))
(command "_text" "_j" p1 htesto 90 (strcat (rtos y 2 0) ")
)
)
)

