Moving ToolBars

Discussion in 'AutoCAD' started by sashk, Aug 5, 2003.

  1. sashk

    sashk Guest

    Hello All,

    I have some custom toolbars that I placed in random areas. Problem: When I exit autocad and invoke the program again, the toolbars moved to a different area. Any ideas why??
     
    sashk, Aug 5, 2003
    #1
  2. sashk

    PF Guest

    It may be the toolbars have been set up at a specified location -

    examine LSP and MNL files. Look for toolbar "show"
    ..... there may be x,y numbers specifying WHERE to SHOW the Toolbar.
     
    PF, Aug 6, 2003
    #2
  3. You have not written the locations to the .MNS file.



     



    With eth toolbars where you want them to be open the customise toolbars dialogue by right clicking on the toolbars.  Make some small change - eg swap the positions of 2 icons and close.  This SHOULD write the new positions to the .MNS file and re-compile the menu.  From there on the toolbars will remain in the positions that you want.



     




    --
    Andrew Nielsen            ;o)>



     



    Andysan1@@bigpond.com
    Remove extra @ to send



    "sashk" <> wrote in message news:...

    Hello All,

    I have some custom toolbars that I placed in random areas. Problem: When I exit autocad and invoke the program again, the toolbars moved to a different area. Any ideas why??
     
    Andrew NIELSEN, Aug 6, 2003
    #3
  4. sashk

    sashk Guest

    Well, I tried everything. When I exit autocad and come back, they still are in the wrong spot. Can I manipulate the code in the .mns so that I can put it anywhere??

    thanks
     
    sashk, Aug 6, 2003
    #4
  5. sashk

    PF Guest

    .... don't know.
    What reference (if any) does the MNL make to toolbars?
     
    PF, Aug 7, 2003
    #5
  6. sashk

    sashk Guest

    I have been loading the .mns file. Should I be loading the .mnl file????? What I did was create a menu file with only toolbars in it and no menu commands. Then I load the toolbars.mns file. Is this right??
     
    sashk, Aug 7, 2003
    #6
  7. sashk

    Mark Propst Guest

    No need to unload a mnu to get the mns written
    when you load a mnu acad creates the mns and a mnc
    acad actually just uses the mnc (compiled) but the mns is human readable.

    if you change a toolbar graphically(in the editor) as opposed to editing the
    text in the mnu, the changes will only be updated in the mns file not the
    mnu file and you will therefore lose those changes if you reload the mnu
    file.
    one approach is to refrain from editing toolbars in the editor and do your
    changes manually in the mnu file, delete the mns and mnc files, then reload
    the mnu file, and you will always keep your changes.
    another approach is if you edit the toolbars in the editor, immediately open
    the .mns file and copy the changed lines, then open the mnu file and paste
    them where they go, delete the mnc and mns files and reload the mnu.
    that way also you will retain the changes.
    if your menu file calls any lisp routines, the mnl file is the usual place
    to put those routines because acad autoloads the mnl file when it loads the
    mnu file and your routines will thus be available when you call them from
    the menu.
    it's not absolutely necessary to follow this, you can load them other ways
    also, it's up to you, but generally the mnu and mnl are seen as
    complementary files that contain(mnl) and refer to(mnu) the same routines.

    hth
    Mark
     
    Mark Propst, Aug 7, 2003
    #7
  8. sashk

    sashk Guest

    Mark, thanks for the advise. What I decided to do was just go ahead and edit the .mns file so that any toolbar makes that I do will automatically be written in the .mns file. The only problem that I have with the .mns file is that its setup is a little different than the .mnu file, making it a little more of a problem. it is something that I have to do.

    Now, the .mnl file. Here is what I have going on.
    I have it load a file called "lsp-libe". Now, the "lsp-libe" has a huge list of lisp routines to load. Here is an example:
    (if (not c:zzz) (Load "zzz")).
    Now, I thought that it was loading all of these lisps into autocad at once, but when I typed in the appload function, I did not see a huge list in there. So, I am assuming that it did a partial load?

    I also read about the "autoload" function. I tried (autoload "zzz") and also (autoload '(zzz)) but it returns a syntax error. Any ideas on that??

    Thanks
     
    sashk, Aug 7, 2003
    #8
  9. sashk

    Mark Propst Guest

    edit the .mns file so that any toolbar makes that I do will automatically be
    written in the .mns file.

    I would suggest you copy those to the mnu as well, if you want to not lose
    your hard work the next time someone reloads the menu
    also

    an example from my acaddoc.lsp
    (autoload "C:/0/0CODE/LISP/MASTER/matchline" '("matchline"))
    that way as soon as you type matchline at the command line, if it's not
    defined, the file is loaded, if you don't use it the file doesn't need to
    load.
    you're welcome
    hth
    Mark
     
    Mark Propst, Aug 7, 2003
    #9
  10. sashk

    Walt Engle Guest

    Mr. Propst is correct. You should make your changes in the mnu file and
    then when you re-compile it, the mns, mnc files will be changed
    accordingly.
    If you have your toolbar in the **TOOLBARS section it should look
    something like the sample below:


    **TB_YOURTOOLBARNAME
    ID_NAMEOFTOOLBAR_0 [_Toolbar("NAMEOFTOOLBAR",_Floating,_Show,400,50,0)]
    ID_TRIM_0 [_Button("TRIM", "XXXX.bmp", "XXXX.bmp")]^c^ctrim

    The second line will allow you to "dock" your toolbar anyplace you wish
    and it will remain there until you "dock" it somewhere else.
     
    Walt Engle, Aug 7, 2003
    #10
  11. sashk

    sashk Guest

    Walt,

    I did everything you said, and still no luck. When I exit autocad, it reverts back to its old place. I did notice that "floating" was not there. Instead, it was "top". I changed it to floating, recompiled, loaded, etc, but still the same problem
     
    sashk, Aug 7, 2003
    #11
  12. sashk

    sashk Guest

    yep
     
    sashk, Aug 7, 2003
    #12
  13. sashk

    Mark Propst Guest

    did you remember to delete the mnc and mnr files before reloading?
    if they exist acad will use them rather than reload your new mnu file.

    reverts back to its old place. I did notice that "floating" was not there.
    Instead, it was "top". I changed it to floating, recompiled, loaded, etc,
    but still the same problem
     
    Mark Propst, Aug 7, 2003
    #13
  14. sashk

    PF Guest

    Also see sashk's other post above- Cancel in Lisp--- dealing with his MNL
    file.


    To elaborate a bit more on MNU/MNS/MNC files:

    MNU -> can contain comments behind leading //'s - otherwise, readable
    and concise Menu text
    MNS -> strips comments from MNU - if you NEED to remember something
    (commented), edit your MNU file, keep it current, and allow ACAD to create
    the MNS

    MNC -> used internally by ACAD - created during Menu compilation (menuload)
    command
     
    PF, Aug 8, 2003
    #14
  15. sashk

    sashk Guest

    Wow, this has become an issue. A couple of things that I have noticed. What I am going to do is delete my .mnc, .mns, and .mnr file and try again. Hopefully I will have some luck there.

    Now, I used to have the toolbars as its own .mns structure because of the issue with reloading menus and loosing things. Now it is a part of the main menu that our office uses. Here is the weird thing. I exported a profile, open the profie to read it and discovered references to the old toolbar menu. Weird! Nowhere have I the old menu loaded, so why is it exporting old menu info?

    Here is the line for my toolbar. Can someone explain what all this means....
    ID_DETAIL_0 [_Toolbar("DETAIL", _Floating, _Show, 0, 2, 1)]
     
    sashk, Aug 8, 2003
    #15
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.