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