Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Have text and a variable all in one line??

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
lesliematt
308 Views, 2 Replies

Have text and a variable all in one line??

Hello all,

 

Is there a way to print in a text box both a string and a variable. I will give an exapmle...

 

    (setq qty_txt (getstring "\nEnter Quantity "))
    (command "text" "J" "MR" pt1 "0.187" "0" "Quantity= ")
    (command "text" "J" "ML" pt1 "0.187" "0" qty_txt)

 

This is a segment of a larger code that askes the user to input a quantity, and it gets stored as 'qty_txt'. I am wondering if there is a way to have the two command lines joined to look more like this....

 

    (setq qty_txt (getstring "\nEnter Quantity "))
    (command "text" "J" "C" pt1 "0.187" "0" "Quantity= " qty_txt)

 

This way both the printed 'Quantity= ' and the variable qty_txt will all be in one text box. Let me know.

-M

2 REPLIES 2
Message 2 of 3
southie
in reply to: lesliematt

try this

 

  (command "text" "J" "C" pt1 "0.187" "0" (strcat "Quantity= " qty_txt))

 

 

Message 3 of 3
lesliematt
in reply to: southie

That worked perfect. Thank you very much.

 

-M

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost