AllExperts > AutoCAD 
Search      
AutoCAD
Volunteer
Answers to thousands of questions
 Home · More AutoCAD Questions · Answer Library  · Encyclopedia ·
More AutoCAD Answers
Question Library

Ask a question about AutoCAD
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Bill DeShawn
Expertise
I can address all 2-D questions and some 3-D questions. I do programming in AutoLISP if it doesn`t involve solid modeling. I can also address menu customization issues and can help you find answers to questions I can`t answer by taking your question directly to Autodesk via their newsgroups.

Experience
I used to do electronic and mechanical design for a flat panel monitor manufacturer, and now I do architectural drafting for an architect. I did and do AutoLISP and menu customization and take pride in making my lisp routines to do the work exactly the way the client likes them done.

Publications
I had a routine published in CADENCE magazine (no longer in publication and taken over by CADALYST). Some of my routines are published on my website at http://my.sterling.net/~bdeshawn

 
   

You are here:  Experts > Computing/Technology > Computer-Aided Design > AutoCAD > Suppress dialog box

AutoCAD - Suppress dialog box


Expert: Bill DeShawn - 10/10/2006

Question
Thanks very much for your valuable information and quick response.
I tried this thing and working very well.
But the AutoCAD mechanical commands are not able to suppress.
for example amoptions
What to do for this type of dialog boxes?

Regards,
Vikas Salunke
-------------------------

Followup To

Question -
How to suppress the dialog box while running lisp or VBA routines in AutoCAD Mechanical?

Answer -
Vikas:
Some command dialogs are able to be suppressed, and some are not.  Those that are able to be suppressed can be done so in one of two ways.
1.  When a (command ...  is issued you can put a - (minus sign) in front of the command.

2.  (If a dialog box comes up due to a command, you can temporarily set the CMDDIA system variable to 0, and then return it to what it was after the routine is done.  If the command looks for files, you will also need to do the same thing with the FILEDIA system variable.

example:
(defun routineerr (msg)
 (if msg (princ msg))
 (if cd (setvar "cmddia" cd))
 (if fd (setvar "cmddia" fd)
 (if olderr(setq *error* olderr))
 (princ)
)

(defun c:routine (/ cd fd)
 (setq olderr *error* *error* routinerr)
 (setq cd (getvar "cmddia"))
 (setvar "cmddia 0)
 (setq fd (getvar "filedia"))
 (setvar "filedia" 0)
 (dostuff)
 (domorestuff)
 (setvar "cmddia" cd)
 (setvar "filedia" fd)
 (setq *error* olderr)
 (princ)
)

Keep in touch
Bill DeShawn
http://my.sterling.net/~bdeshawn


Answer
I am an AutoCAD person - not an AutoCAD Mechanical person.  AMOPTIONS does not come up when I type it it.  If AMOPTIONS comes up when you type OPTIONS, try typing in .OPTIONS with a period before the command.  It may be that the command was undefined and a new function has been created in its place.  Perhaps if you fill me in a little better and tell me exactly when does this dialog come up and what is it that you want to see instead of the dialog that pops up when you really want something else.

Bill DeShawn
http://my.sterling.net/~bdeshawn


Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.