Registered forum members do not see this ad.
How do you offer options while still having the command active? How about displaying current settings?
example:
Autolisp response pleaseCode:Command: ML Current settings: Justification = Zero, Scale = 1.00, Style = BWALL Specify start point or [Justification/Scale/STyle]:
No need for menucmd.
All the GetXXX functions will honour keywords - use initget.
As for the current settings, just use a princ call.
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
DropBox | finding the light...
Seann: ...it went crazy ex-girlfriend on me...
eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...
I got my program to work the way I wanted. Many thanks Lee!
one more question
Will this only work for while or is there other commands I can use this with?Code:(setq wait t) (while wait ...
___
I had problems with...Maybe the routine had errorsCode:(progn wait
Last edited by Lt Dan's legs; 16th Jul 2010 at 04:01 pm. Reason: Adding notes
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper




Registered forum members do not see this ad.
Do you need a form that shows all the current settings and if correct press Ok else pick box and change this could be written as a seperate defun and just called as a step at the start of your program.
Or princ all the results as per Lee Mac and just press enter if ok, any other key would mean change this is pretty quick in a program and you dont need to code a dcl if in lisp. I use this enter method a lot very easy for everyone to use at our work.
Hopes this may be of useCode:(princ "all your values here") (setq ans (getstring ans "\nIf values ok press <Cr> else any key")) (IF (= ans NIL) (princ) (setnewvals) ) (defun newvals () (princ styleval) (setq ans (getstring ans "\nIf values ok press <Cr> else any key")) (IF (= ans NIL) (princ) (progn (setq styleval (Getstring "\nEnter new style name")) (setvar "stylname" stylname) ; I can nor rember style variable ) ) just repeat for all other vaules may mean you press Cr Cr enter val Cr Cr etc
Bookmarks