TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: RolandOrzabal on September 03, 2012, 03:57:28 AM
-
A friend of mine ask if it is possible to input first the Mline scale before proceeding with the MLINE command :
so i thought it would be like this
(setq UserScale (getreal "\nEnter Mline Width: "))
(command "._mline" "j" "z" "scale" UserScale "style" "Standard")
it is working but my concern is if i want to run again the routine, i want the last inputed value to show. The user can press enter to accept the default or enter a new value.
I've heard of rtos to convert the number into a string but don't know how to apply it here
-
Something like this
(defun c:MLTest
(/ UserScale
) (setq *UserScale
* UserScale
)) (setq UserScale
*UserScale
*))
-
In addition to Irneb's example, perhaps this will help you NOD:
http://lee-mac.com/promptwithdefault.html (http://lee-mac.com/promptwithdefault.html)
-
Another ...
(setq wids
(if wids widths
1.0 )) (T wids)
)
)
)
(command "._mline" "j" "z" "scale" (rtos wids
2 2) "style" "Standard") )
)
-
Only one global variable is required...
-
Thanks for ALL the help Lee, Tharwat irneb
it worked liked a charm!
thanks again