Customized menus.

Discussion in 'AutoCAD' started by BillZ, Jul 9, 2003.

  1. BillZ

    BillZ Guest

    I am looking at setting up a new system with Acad 2k4.
    If I want each user to have his/her own menu, I was told to use the menuload command in the acad.mnl file to load a copy of the acad.mnu with each user name. So if I use:
    (cond (= (getvar "loginname") "WPZ")
            (command "menuload" menuname)
                )
          (= (getvar "loginname") "RDM")
            (command "menuload" menuname)
                )
      )
    That should load each copy as named but my question is: After the initial loading of each custom menu AutoCAD creates the .mns and .mnc files for each menu and these are to my understanding what is used to store further customization to toolbars ect. Does loading the .mnu file each time acad is opened from the .mnl file overwrite the .mns and .mnc files that are now different than the original custom.mnu? I don't think so but am looking for further info on this subject before I actually do this project.

    TIA

    Bill
     
    BillZ, Jul 9, 2003
    #1
  2. BillZ

    SMMASON Guest

    I have always found that when loading a .mnu file, it creates new .mns and .mnc files. When you customize a toolbar for that menu file, the changes are made in the .mns file and not the .mnu file. So, if you load the .mnu file, any changes made by the user to his/her own menu will be lost. I suggest loading the .mns file.
     
    SMMASON, Jul 9, 2003
    #2
  3. BillZ

    OLD-CADaver Guest

    If the MNU/MNS is unchanged, the MENULOAD command will not re-compile the menu.
     
    OLD-CADaver, Jul 9, 2003
    #3
  4. BillZ

    SMMASON Guest

    In addition, I make backup files for both the users menu and Autocad menu. From experiance, I have a user that likes to modify toolbars alot. Eventually, the users messes something up and would like to get it back to where it was.
     
    SMMASON, Jul 9, 2003
    #4
  5. BillZ

    BillZ Guest

    >>>>>If the MNU/MNS is unchanged, the MENULOAD command will not re-compile the menu.<<<<<<<<<

    By "unchanged" do you mean if they exist already or something else?

    Bill
     
    BillZ, Jul 9, 2003
    #5
  6. BillZ

    BillZ Guest

    >>Eventually, the users messes something up and would like to get it back to where it was.<<<



    Been there. :)



    Bill
     
    BillZ, Jul 9, 2003
    #6
  7. BillZ

    Tom Smith Guest

    Your life will be a lot easier and much chaos will be avoided if you use the partial menu mechanism to allow users to customize their own menus.



     



    In our setup, the base menu is an unaltered, out-of-the-box acad menu. And we use the Express Tools, which loads a partial menu. And we have a company-standard custom partial menu, which includes toolbars, pulldowns, etc. Its associated mnl file causes all of our custom lisps to load.



     



    Finally every user has a partial menu named user.mns, with associated user.mnl, on their local machine, and they're entitled to do anything they want to with that. It's initally empty, containing nothing but an empty "user" toolbar. They're encouraged to add toolbars, and customize them to their heart's content, but NOT to alter anything outside of the "user" menu. That way, when I issue a revised company-standard menu (as I do regularly), it won't affect anything the users have done.



     



    If they want their own toolbar that has a few buttons from an Acad toolbar, and some buttons from one of our toolbars, they can drag copies of those buttons onto their own toolbar, then turn off the other toolbars.



     



    The point is, everyone has all the same stuff, PLUS everyone can have his own personal stuff too. That's the best way to approach any customization, when at all possible: make it an addition, on top of a standard element, not an alteration of the standard element. We run a complete, standard installation of Acad, and not one single file is altered in that. All of our stuff is *in addition to* that, not a modification of it. Makes maintenance a breeze. 



     



    Don't load an mnu!!



     



    Loading an mnu file overwrites the associated mns and mnc files. An mnu is called a menu "template" by Acad. It isn't used for anything but creating an mns, if and when you force it to load. Acad itself doesn't operate on anything but the mns. Think of the mnu as a backup file. When you have an mns that works, copy it to an mnu for safekeeping. Acad will never touch or alter the mnu unless you force it to. But everytime the user changes a toolbar, for instance, the mns changes and the menu recompiles. The mnu will never reflect any changes the user has made, only the mns will. If you reload the mnu, you'll wipe out the user-customized mns and destroy everything they've done.



     



    The menuload command loads the mns file by default. If you say (command "menuload" "user") with no extension, it loads user.mns. It doesn't use, load, or access mnu files unless you specifically tell it to in the dialog box, or unless you specify the mnu extension (command "menuload" "user.mnu"). In which case it will overwrite the mns and recompile the menu.



     



    The Acad profile includes what menus to load. In our case, the profile causes the Acad menu and three partial menus to load. It isn't necessary for us to menuload anything, because each person has an identically named (though different) user.mns on their local machine. The company-standard profile causes it to load.



     



    Unless your people move between machines, or you have some other reason to put all menus in one central location, this would seem like an easier approach than individually named menus. Its not clear what you're trying to do in the fragment below ... presumably you've already set the menuname variable before the cond. If so, why not just load it?? Or simply adopt the convention that the menu name matches the loginname, so WPZ's menu is wpz.mns. Then all you need to do is say (command "menuload" (getvar "loginname")). No point in using a cond when the result of every test condition is the same.



     



    Again, look into the partial menu mechganism before you go any farther into this project. Users will mess up their menus, and your life will be easier if they only mess up their little partial menus instead of your great big menu. And if you don't isolate their customizations in separate partial menus, you'll never be able to maintain or revise a company-standard menu.



     



    Tom



    BillZ <> wrote in message news:...

    I am looking at setting up a new system with Acad 2k4.
    If I want each user to have his/her own menu, I was told to use the menuload command in the acad.mnl file to load a copy of the acad.mnu with each user name. So if I use:
    (cond (= (getvar "loginname") "WPZ")
            (command "menuload" menuname)
                )
          (= (getvar "loginname") "RDM")
            (command "menuload" menuname)
                )
      )
    That should load each copy as named but my question is: After the initial loading of each custom menu AutoCAD creates the .mns and .mnc files for each menu and these are to my understanding what is used to store further customization to toolbars ect. Does loading the .mnu file each time acad is opened from the .mnl file overwrite the .mns and .mnc files that are now different than the original custom.mnu? I don't think so but am looking for further info on this subject before I actually do this project.

    TIA

    Bill
     
    Tom Smith, Jul 9, 2003
    #7
  8. BillZ

    Kevin Nehls Guest

    Here's what I've done to do the same, but I don't have to worry about
    having different named files lying around.

    (we use acad mechanical and have 3 menus loaded just from that)

    --AutoCAD's standard menus are loaded and unchanged.
    --Our company's standard partial menu is loaded from the network
    --a "Personal.mns" is loaded from each workstation locally. This is
    where the users have been instructed to save their toolbars and such

    (to combat them accidentally saving the toolbars in AutoCAD's menus I've
    actually put them on the network and have them loaded from there and
    removed them from the local workstation).

    All of those settings are saved in a profile .arg file and loaded and
    setup the first time I install acad on a system.

    I've been doing it like this for over 1-1/2 years and haven't had
    anything blow up on me yet. It also makes upgrades a million times
    easier becuase if Autodesk changes the menus that come with acad we get
    those, our company standard menu is there and every gets updates right
    after they're made (next time they open acad or run our command to
    reload that menu) and the user's toolbars are saved in a safe, separate
    location to just load in the next version of acad.

    HTH
    Kevin
     
    Kevin Nehls, Jul 9, 2003
    #8
  9. BillZ

    Tom Smith Guest

    Forcing a menuunload/menuload, and specifying the mnu extension in the menuload, always overwrites the mns and makes the menu recompile, regardless of whether the existing mnu and mns are already identical. Try it. It's a harmless, meaningless recompilation, but it happens.



     



    Menuload never loads an mnu unless you force it to. If you leave off the extension, it loads the mns.



     



    Menuloading the mns will not force a recompilation unless the mns has a later date than the mnc. Recompilation happens automatically when Acad opens, any time this is true. Date on the mnu is irrelevant since Acad doesn't use the mnu for anything, unless you force it to overwrite an mns.



     





    Anything the user does to alter a toolbar will change the mns, which will recompile the mnc/mnr on the spot. That's the only thing they're likely to do, but if they manually edited the mns, that would do the same effect. Anything that changes the file date of the mns to be more recent than the mnc will trigger recompilation next time Acad loads.



     





     



    BillZ <> wrote in message news:...

    >>>>>If the MNU/MNS is unchanged, the MENULOAD command will not re-compile the menu.<<<<<<<<<

    By "unchanged" do you mean if they exist already or something else?

    Bill
     
    Tom Smith, Jul 9, 2003
    #9
  10. BillZ

    Tom Smith Guest

    Great minds :) I was pounding out nearly identical advice at the same time.
    I also manage the partial menu loading by including it in a standard arg
    file.
     
    Tom Smith, Jul 9, 2003
    #10
  11. BillZ

    Kevin Nehls Guest

    Ah, but you beat me by a couple minutes ;)
     
    Kevin Nehls, Jul 9, 2003
    #11
  12. BillZ

    BillZ Guest

    Thanks,
    And I think I am understanding more about this.
    I would however like the users here to be able to change anything they want as far as toolbars and what order the buttons are in or whatever from the interface and not have it change any of these things in any other users setup. I would think this would involve a separate menu for each user and a check of some kind in the acad.mnl to load each users menu by loginname. Initially the .mnu's would be basically copies of the acad standard. Is this possible?
    I know you can tell them to not change certain things but hey, let's be real, with new users coming in you can't catch everything that they might do. I would rather make it so that each user can do basically anything they want to their own set up without it affecting anybody elses.

    Bill
     
    BillZ, Jul 9, 2003
    #12
  13. BillZ

    Kevin Nehls Guest

    IMO, you really don't want them editing even a copy of the acad.mnu. Trust
    me, I've been there. They customize that, then you upgrade acad and acad's
    menus have changed, but your custom menus don't have those new updates and
    changes. So now you've either got to start your customizations all over
    again or figure out a way to add all of the new/changed/fixed stuff from the
    new acad menus to your custom menus. Not fun or easy either way.

    Take a look at my other post about using a "person" partial menu, they can
    then create their own pull-downs, toolbars, right-click menus, etc and swap
    them out for the ones being loaded with acad's menus if they want.

    --
    Kevin Nehls


    want as far as toolbars and what order the buttons are in or whatever from
    the interface and not have it change any of these things in any other users
    setup. I would think this would involve a separate menu for each user and a
    check of some kind in the acad.mnl to load each users menu by loginname.
    Initially the .mnu's would be basically copies of the acad standard. Is this
    possible?
    real, with new users coming in you can't catch everything that they might
    do. I would rather make it so that each user can do basically anything they
    want to their own set up without it affecting anybody elses.
     
    Kevin Nehls, Jul 9, 2003
    #13
  14. BillZ

    BillZ Guest

    Kevin,
    I don't that I would let them modify acad.mnu or a copy.
    But if they create a toolbar or rearrange the buttons on a toolbar from the acad interface, what keeps track of those types of changes? Sure you can load a partial menu for osnaps and whatever but what about changes to the regular interface of each user? Some like to rearrange tool bars, create new tool bars and use their own icons that they create in the icon editor. What I want to do is start each one with the standard menu but as they make modifications from the graphical interface of acad, these changes are then kept and brought up each time they start autocad only on their machines. We have a diverse group of users as far as their JD's are concerned and they each use different commands and lisps that are loaded onto toolbar buttons as they see fit for their best performance. They are the experts at what they do and I'm just trying to figure out a way to make it work on our new system. Right now there are full menus loaded on each machine and if two people use the same machines and one makes changes to toolbars, it changes up the one on day shift. I don't care what changes they make from the interface. I just want to know how to kept each ones changes unique to their profile and loginname.



    Bill
     
    BillZ, Jul 9, 2003
    #14
  15. BillZ

    BillZ Guest

    >> then I'd probably implement the same sort of thing you want to my having a menu named after their loginname so that gets loaded <<<<
      

    That was the whole idea with my question.
    If I initially make copies of acad.mnu and load them initially as "WPZ" or "RDM" with the acad.mnl to create the user.mns files, will the menuload command overwrite the user.mns files? What I don't know is do I use (command "menuload" "WPZ.MNU") or will(command "menuload" "WPZ") in the acad.mnl file to initially load the personalized menus?

    Thanks

    Bill
     
    BillZ, Jul 9, 2003
    #15
  16. BillZ

    Tom Smith Guest

    Yeah, but my "user" menus seem so impersonal compared to your "personal"
    ones.
     
    Tom Smith, Jul 9, 2003
    #16
  17. BillZ

    BillZ Guest

    I got it!
    In the Acad.mnl
    (command "menuload" (getvar "loginname"))

    This should work wheather the user.mnu has already created the .mns files or not and is a lot less code.

    You guys get me thinking , which can at times be benificial. {:^)

    Bill
     
    BillZ, Jul 9, 2003
    #17
  18. BillZ

    Kevin Nehls Guest

    I use (command "menuload" "menuname.mns"). Using .mnu will overwrite the
    ..mns files everytime, thus erasing their toolbar mods.

    --
    Kevin Nehls


    having a menu named after their loginname so that gets loaded <<<<
    "RDM" with the acad.mnl to create the user.mns files, will the menuload
    command overwrite the user.mns files? What I don't know is do I use (command
    "menuload" "WPZ.MNU") or will(command "menuload" "WPZ") in the acad.mnl file
    to initially load the personalized menus?
     
    Kevin Nehls, Jul 9, 2003
    #18
  19. BillZ

    BillZ Guest

    What if the .mns does not exist yet?
     
    BillZ, Jul 9, 2003
    #19
  20. BillZ

    Tom Smith Guest

    Kevin &amp; I have given you essentially identical advice on how to do this.



    &nbsp;



    First, forget all about mnu's in any connection except as a safe backup for a menu. The mns is the working file. AutoCAD doesn't use mnu files at all unless you force it to. See my earlier post on menuloading and compilation.



    &nbsp;



    Second, leave the main Acad menu completely alone, and put it in a read-only place where the users CAN'T mess it up. Likewise for any company-standard things, which should be set up as partial menus to separate them from the giant Acad menu.



    &nbsp;



    Third, load partial personal menus for each user. Both Kevin and I use the same name (personal.mns or user.mns) for all of these, so they are loaded via the profile arg file. But if you're going to place them on machines that people share, I guess you need unique menu names, and you'll need to menuload the apprpriate one per user.



    &nbsp;



    Fourth, teach them that they can do anything they want, but ONLY in their own menu file. They'll give up messing with the main menu anyway when they find it&nbsp;doesn't work (if it's read-only). They can rearrange things, create toolbars, etc, without destroying the main menu, or each other's partial menu. But they have to do it the right way. They can't&nbsp;start with an Acad toolbar and remove the buttons they don't want. They have to start with an empty new toolbar of their own, then&nbsp;ADD the Acad toolbar buttons they want. Same result, just done differently. Any personal toolbar they want to create has to begin with an empty one&nbsp;from their own menu, not by altering an Acad or company-standard toolbar. They can turn Acad toolbars off or on, or rearrange tham, they just can't&nbsp;alter their contents.



    &nbsp;



    Fifth, watch what they're doing and learn from them. It wouldn't hurt to look at what they're doing right now and talk to them before you try setting all this up. People are different, but within a given office they aren't&nbsp;THAT different. Some of the toolbar changes that one person is doing&nbsp;would almost certainly be beneficial to&nbsp;some of the others. Anything that you can include in the&nbsp;"standard" menu(s) becomes available to everybody, and part of your role in this is to help them spend their time WORKING instead of fiddling with toolbars. You don't want several&nbsp;different people spending time re-creating essentially the same toolbars. If you've isolated your&nbsp;standard menu(s) to protect it from the users, you can always add user-requested features to it and update it for everybody, as Kevin and I regularly do. If a user wants a&nbsp;feature that's highly individualized or quirky, I show them how to do it for themselves. But if it seems to me that several other people could make use of it, I revise the "company" menu so everyone has access to the feature. If&nbsp;5 people wind up using it, I figure I've saved at least 4/5 of the toolbar-fiddling time that could otherwise have been spent on work.



    &nbsp;



    Tom



    &nbsp;



    BillZ &lt;&gt; wrote in message news:...

    Kevin,
    I don't that I would let them modify acad.mnu or a copy.
    But if they create a toolbar or rearrange the buttons on a toolbar from the acad interface, what keeps track of those types of changes? Sure you can load a partial menu for osnaps and whatever but what about changes to the regular interface of each user? Some like to rearrange tool bars, create new tool bars and use their own icons that they create in the icon editor. What I want to do is start each one with the standard menu but as they make modifications from the graphical interface of acad, these changes are then kept and brought up each time they start autocad only on their machines. We have a diverse group of users as far as their JD's are concerned and they each use different commands and lisps that are loaded onto toolbar buttons as they see fit for their best performance. They are the experts at what they do and I'm just trying to figure out a way to make it work on our new system. Right now there are full menus loaded on each machine and if two people use the same machines and one makes changes to toolbars, it changes up the one on day shift. I don't care what changes they make from the interface. I just want to know how to kept each ones changes unique to their profile and loginname.



    Bill
     
    Tom Smith, Jul 9, 2003
    #20
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.