Results 1 to 4 of 4

Thread: Some commands do not load into drawing session.

  1. #1
    Member
    Join Date
    2004-08
    Posts
    15

    Question Some commands do not load into drawing session.

    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?

    Guy

  2. #2
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Some commands do not load into drawing session.

    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.

  3. #3
    Member
    Join Date
    2004-08
    Posts
    15

    Post Re: Some commands do not load into drawing session.

    Hi RobertB,
    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
    Guy

  4. #4
    Administrator RobertB's Avatar
    Join Date
    2001-08
    Location
    Dallas TX USA
    Posts
    5,825

    Default Re: Some commands do not load into drawing session.

    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"))

Similar Threads

  1. Restrict AutoCAD 2009 to one drawing per session
    By dave.wright in forum AutoCAD General
    Replies: 8
    Last Post: 2008-06-25, 01:33 PM
  2. Replies: 8
    Last Post: 2008-03-25, 03:12 PM
  3. Replies: 6
    Last Post: 2007-03-28, 11:31 AM
  4. Different commands in same AutoCAD session
    By mathew.worland in forum AutoCAD General
    Replies: 9
    Last Post: 2004-08-04, 09:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •