• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

variable within a user input request

luc@85

Guest
Hello everyone, I am new to the forum and I would have a question to submit to experts of the lisp language.

I would like to know if you can insert a variable, previously defined, within a user input request.
I try to explain myself better with a small example; Suppose we have:

(setq x poplar)
(entsel "\n.... select polylinea ")

is it possible to make the word "select polylinea pippo" appear at the time of the request?

I am not very expert in lisp language, and I thank in advance anyone who tries to help me. . .
 
Of course.

or put the string directly in the function, like something like that
(setq h 2.23)
(setq alt (getreal) (strcat "\ninseri height <" (rtos h 2 2) ": ")

or build the required string as you want before the request and then call it back
(setq message (strcat "height of the text?: sending =" (rtos h 2 2) ": ")
(setq alt (getreal message)
 
Thank you so much crystal! !
I tried something like this but I didn't insert rtos before the numerical variable and then it made me mistake. .
Thanks again
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top