Lt Dan's legs Posted July 16, 2010 Share Posted July 16, 2010 How do you offer options while still having the command active? How about displaying current settings? example: Command: ML Current settings: Justification = Zero, Scale = 1.00, Style = BWALL Specify start point or [Justification/Scale/STyle]: Autolisp response please Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted July 16, 2010 Author Share Posted July 16, 2010 How do you offer options while still having the command active? How about displaying current settings? example: Command: ML Current settings: Justification = Zero, Scale = 1.00, Style = BWALL Specify start point or [Justification/Scale/STyle]: Autolisp response please I found the first part. menucmd still wondering about the settings display Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 16, 2010 Share Posted July 16, 2010 No need for menucmd. All the GetXXX functions will honour keywords - use initget. As for the current settings, just use a princ call. Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted July 16, 2010 Author Share Posted July 16, 2010 No need for menucmd. All the GetXXX functions will honour keywords - use initget. As for the current settings, just use a princ call. When I put in menucmd I was looking at the old dline lisp. I thought I figured it out but by the time I realized it wasn't it you answered my question. I thought there was a different way of doing princ call but seems like this is the best way. Thank you Quote Link to comment Share on other sites More sharing options...
alanjt Posted July 16, 2010 Share Posted July 16, 2010 No need for menucmd. All the GetXXX functions will honour keywords - use initget. As for the current settings, just use a princ call. Except getstring, for obvious reasons. Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted July 16, 2010 Author Share Posted July 16, 2010 I got my program to work the way I wanted. Many thanks Lee! one more question (setq wait t) (while wait ... Will this only work for while or is there other commands I can use this with? ___ I had problems with (progn wait ...Maybe the routine had errors Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 16, 2010 Share Posted July 16, 2010 one more question (setq wait t) (while wait ... Will this only work for while or is there other commands I can use this with? ___ I had problems with (progn wait ...Maybe the routine had errors I don't know what you mean? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 17, 2010 Share Posted July 17, 2010 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. (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 Hopes this may be of use Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.