You are here:

AutoCAD/restoring defaults in Amlayer (AutoCAD Mechanical 2011)

Advertisement


Question
I am looking for autolisp code that will restore defaults to the mechanical layers in AutoCAD Mechanical 2011. At the present time, I type "Amlayer" to open the Amlayer dialog box and then I select the following: "Restore-defaults", "Restore-defaults" again for confirmation, "Apply", and "Ok". I can't find a way to do this via command line/autolisp. Can you help me?

Answer
Robert:  I don't have Mechanical, however, I can offer a couple of suggestions:
1. Try toggling the CMDDIA system variable in your routine.
2. Try putting a minus sign before the command name in your code.  Example:
    (command "-amlayer" ...etc.
Before doing the 2nd one.  Try -AMLAYER on the command line before running it in LISP to get the correct syntax.

Also, I found a helpful thread on this problem in an older version of MDT:
http://forums.autodesk.com/t5/Autodesk-Mechanical-Desktop/AMLAYER-still-not-fixe...


Let me know how it goes
Bill DeShawn
http://my.sterling.net/~bdeshawn

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


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

©2012 About.com, a part of The New York Times Company. All rights reserved.