Problem with sharing menu / toolbar

Discussion in 'AutoCAD' started by Steve Jones, Jan 6, 2004.

  1. Steve Jones

    Steve Jones Guest

    Hello All,

    I have created an .mns file on our network, part of which is shown below.

    //
    // AutoCAD menu file - L:\LISPS\TOOLBAR\LispToolbars.mns
    //

    ***MENUGROUP=LISPTOOLBAR

    ***TOOLBARS
    **LISP-FILES
    ID_LISP_FILES_0 [_Toolbar("LISP-FILES", _Floating, _Show, 464, 232, 1)]
    ID_UserButton_0 [_Button("advert", "advert.bmp", "ICON_16_BLANK")]^C^Cadvert
    ID_UserButton_1 [_Button("AreaT", "areat.bmp", "ICON_16_BLANK")]^C^CAreat

    ***HELPSTRINGS
    ID_USERBUTTON_0 [adds vertexes to polylines]
    ID_USERBUTTON_1 [Adds area of polyline in various units]


    //
    // End of AutoCAD menu file - L:\LISPS\TOOLBAR\LispToolbars.mns
    //


    The theory being change the toolbar / menu & it'll change on everyones
    machine.
    Problem is the toolbar will not load on any machine apart from the one that
    originally compiles the menu, the menu loads but the toolbar doesn't.
    Unloading the menu on the original machine then deleting the .mnr / .mnc
    files on the server is the only way to get the toolbar to load on another
    machine.
    There is a support search path to the Network drive on each machine.
    Is there any way to do this???

    Steve
     
    Steve Jones, Jan 6, 2004
    #1
  2. Steve Jones

    ECCAD Guest

    If the toolbars on other machines only show a 'happy face',
    you need to copy the .bmp files to L:LISPS\TOOLBAR\
    folder also. The icons are stored / referenced in the .mnr file.
    Bob
     
    ECCAD, Jan 6, 2004
    #2
  3. Steve Jones

    BillZ Guest

    Where are you loading the toolbar.mns file?

    If your base menu is acad.mns the autocad will look for a .mnl file of the same name.
    It is in the .mnl file that you can load the toolbar .mns.

    (if (and (setq mnuloc (findfile toolbar.mns")))
    (not (menugroup "lisptoolbar")))
    (command "menu" mnuloc)
    )
    So each machine needs to have an .mnl file that matched their base menu file name and with the code above.

    Bill
     
    BillZ, Jan 6, 2004
    #3
  4. Steve Jones

    Steve Jones Guest

    I am manually loading the .mns file using MENULOAD
    Each user has their own ACAD.mn* and in a few cases AECARCHX.mn* which are
    stored locally on their computer.
    If I use the 'menu' command I lose all other menus bar ACAD. Changing to the
    'menuload' command and I have the same problem, the menu loads but the
    toolbar doesn't.
    I think it has something to do with the .mnc file being locked, but I may be
    wrong.
    Any ideas?

    BTW, when there is no problem with the icons.

    Steve



    file name and with the code above.
     
    Steve Jones, Jan 6, 2004
    #4
  5. Steve Jones

    Mark Propst Guest

    are you aware that you must delete mns, mnc, and mnr after revising mnu and
    before reloading?
    other wise acad will use previous mnc, mnr and ignore changes to mnu even
    though you asked it to reload (via menuload)
    eg:
    this is what I use after revising my custom partial menu (by editing the mnu
    file, not the mns or via toolbar)
    ;if you're editing the mns file or using editor/toolbar to change toolbars
    (not recommended), don't use this technique, you'll lose your changes to the
    mns file.
    (defun c:RELOADZ (/ mn)
    (command "menuUNload" "MARKZ");unload menugroup
    ;DELETE FILES "MARKZ.MNC MARKZ.MNS MARKZ.MNR")
    (Vl-file-delete "Z:/ACsupport/MARKZ.MNR")
    (Vl-file-delete "Z:/ACsupport/MARKZ.MNC")
    (Vl-file-delete "Z:/ACsupport/MARKZ.MNS")
    (Vl-file-delete "Z:/ACsupport/MARKZ._MN")
    (command "menuload" "Z:/ACsupport/MARKZ.MNU");reload menu file
    (princ)
    )
     
    Mark Propst, Jan 6, 2004
    #5
  6. Steve Jones

    Tom Smith Guest

    Normally I only deal with mns files, but I was curious about this.

    I copied an mns to mnu, then manually deleted a toolbar button in the mnu,
    then used menuload to unload the menu and then load the mnu, without
    deleting anything. The menu recompiled, and the previous mns, mnc, and mnr
    files were overwritten with new files. There's no doubt that the mnc was
    replaced, since it now has one less button on the toolbar.
     
    Tom Smith, Jan 6, 2004
    #6
  7. Steve Jones

    Steve Jones Guest

    Turns out our offices delightful combo of ADT, vanilla ACAD & LT was to
    blame.
    Any station running Vanilla ACAD that has the menu / toolbars loaded appears
    to lock all LT stations out of the .mnc file somehow.
    Looks like 3 separate .mnu files now, which is still better than 40 I
    suppose.
    Thanks for the help guys,

    Steve
     
    Steve Jones, Jan 6, 2004
    #7
  8. Steve Jones

    Mark Propst Guest

    Then maybe my information is outdated. It used to be the case(or so i
    thought)
     
    Mark Propst, Jan 6, 2004
    #8
  9. Steve Jones

    Tom Smith Guest

    Perhaps Bob's reply explains this. We keep menu files locally, but I would
    imagine that as he says, you'd want to make any changes to a shared menu
    either offline or while nobody else is using the files.
     
    Tom Smith, Jan 6, 2004
    #9
  10. Steve Jones

    ECCAD Guest

    Not only that, but ACAD saves many things to Windows registry on close. References them on session open. This can also cause unexpected (results).
    Bob
     
    ECCAD, Jan 6, 2004
    #10
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.