Monday, February 14, 2011

Error when invoking command: Unknown command

When you enter a command, an error message similar to the following message is displayed:
Command: _ai_molc Unknown command "AI_MOLC". Press F1 for help.

Solution

Commands such as Make Object's Layer Current and Deselect from the Right-click ShortCut Menu (among others) are defined in the acad.mnl file and do not function unless this MNL file is loaded in memory.
This problem occurs because the AutoCAD® software is unable to load the function definitions in the acad.mnl file. Several AutoCAD core functions are defined in acad.mnl; if you modify menus or load menus other than the default without regard to this fact, the acad.mnl file may not load. In that case, the functionality is never defined.
Use either of the following methods to resolve this problem:


Method #1
Manually load the acad.mnl file.
  • On the command line, enter (load "acad.mnl").
Method #2
Make a copy of the acad.mnl file with the same file name as the MNU file.
  1. Make a copy of the acad.mnl file.
  2. Rename the copy of the acad.mnl to the same file name as the main MNU file you are loading. For example, if you are loading mymenu.mnu, rename the copy of acad.mnl to mymenu.mnl.
  3. Restart the software to load the MNL file you created in step 2.

No comments:

Post a Comment