View Full Version : Some commands do not load into drawing session.
2005-05-06, 07:59 PM
My customized menu works well but if I should change dwg's it might loose a command. Different DWG's loose different commands. I receive dwgs from different client's so do not know exactly what they contain. I placed all AutoLISP files in C:documents and settings Support. The customized menu loads with Autocad before any drawing is opened. I don't understand why the menu would change with the dwg. Does any one have an idea?
2005-05-06, 08:12 PM
It sounds like your menu's .mnl file is not autoloading your code. When you load AutoLISP code in one drawing it does not mean it is loaded in all drawings, or subsequent drawings. So autoload your code in the .mnl file and then they will be available any time you menu loads. Autodesk wrote an (autoload) function that loads with AutoCAD, so you can use it to autoload your stuff.
2005-05-24, 12:36 AM
I am coming back with the same problem. You suggested I AUTOLOAD my code into the .mnl file so off I went. I thought I could handle that, but NO, I couldn't. I knew it sounded to simple. What did you mean by autoload my code. How? I used the apps load command in acad to load the lisp and placed them in the start up suite.
When you mention code did you mean the complete autolisp file or just the command line. I have been trying to make a acad.lsp and acaddoc.lsp files. I store my lisp files in a separate directory on the same level as acad. Do the lisp files have to be individually moved one at a time to the .mnl or is there a way to drag them?
Thanks again for excusing my ignorance
2005-05-24, 05:05 AM
The Acad200xDoc.lsp has a function defined in it to support autoloading your own command functions. So all you need to do in your .mnl file is use that function.
Here is a sample. It assumes the command-line function name is the same as the filename. The first argument is the filename, and the second argument is a list of functions in that filen that you need autoloaded.
(autoload "MyLisp" '("MyLisp"))
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.