Custom Toolbar Icons are all BLACK!

Discussion in 'AutoCAD' started by Steven Craig Basham, Dec 10, 2004.

  1. I'm sure this has been covered before. One of my cad users made a change to
    a shared menu setup on a network drive... this caused his and everyone
    else's Icons to become black. I attempted to have everone log off the
    system and restore from a tape (a month ago, no less) the menu and icons.
    When they logged back in, everything was still black. That makes me think
    the icons are loaded once from the system, then stored locally (or maybe
    something in the registry is causing this non-update). Can anyone help me
    to get back the icons? There's approximately 50+ custom icons in this menu
    setup, and I certainly don't want to have to rebuild it.

    Thank you for your time!

    Steven Craig Basham
    CAD Administrator
     
    Steven Craig Basham, Dec 10, 2004
    #1
  2. Steven Craig Basham

    Dommy2Hotty Guest

    Reload your customized MNU file and will be fine...that is unless you (like most everyone) don't use MNU files, and let AutoCAD use whatever icons it like. That's what happens when you only use a MNS file...which is why I don't :)
     
    Dommy2Hotty, Dec 10, 2004
    #2
  3. Steven Craig Basham

    Jim Claypool Guest

    That happens when AutoCAD2002 uses a menu compilied with AutoCAD2004.
     
    Jim Claypool, Dec 10, 2004
    #3
  4. Steven Craig Basham

    Tom Smith Guest

    Reload your customized MNU file and will be fine...that is unless you
    (like most everyone) don't use MNU files, and let AutoCAD use whatever icons
    it like. That's what happens when you only use a MNS file...which is why I
    don't :)

    You using an MNS whether you like it or not. Acad does not use the old MNU
    format in any way at all, unless you force it to do so by making it load an
    MNU rather than the default MNS, and accepy the warning.

    Doing this causes Acad to produce an MNS file, overwriting any existing MNS
    file of the same name. The MNS is the "source" file from which the compiled
    menu is created. Acad can't and doesn't compile from an MNU file. The only
    thing it does with an MNU is strip out the comments and make an MNS from it,
    and then only if you force the issue.

    It requires manual editing of a menu file to have full control of the BMP
    filenames. Acad does not "use whatever icons it likes." It uses the icons
    you specify, but it will give them arbitrary names and can toss them in
    unpredictable folders. Like any other kind of customization, it requires
    some knowledge and attention to make things come out the way you want. It
    makes no difference, in the final analysis, whether you type your code into
    a file with an MNS or an MNU extension. If you want to call it MNU, that's
    fine. It will be converted to an MNS anyway, and that's the file that will
    be used.

    The only difference in approaches is just what Acad documents: any
    interactive toolbar changes are made in the current MNS file, which, once
    again, IS the menu source that is in use. If you edit anything other than
    that file, you will wipe out any toolbar changes that have been made
    on-screen. If you want to take the current MNS and rename it to MNU for
    editing purposes, fine. It's only an extra step.

    "That's what happens when you only use a MNS file" is simply a false
    statement. It's possible to make exactly the same mistakes regardless of the
    extension you put on the filename.
     
    Tom Smith, Dec 20, 2004
    #4
  5. Steven Craig Basham

    Walt Engle Guest

    Well, yes and no. I make ALL my changes to my mnu file, including icons. Then,
    when I recompile, everything is as I want it. One of the problems (as you
    pointed out circumventially) is changing ONLY the mns file and someone coming
    along and recompiling the mnu file and voila, changes to the mns file are gone.
     
    Walt Engle, Dec 20, 2004
    #5
  6. Steven Craig Basham

    Dommy2Hotty Guest

    Actually, you're using a MNC...you know...the compiled version of the MNS, which is a stripped down version of the MNU...
     
    Dommy2Hotty, Dec 20, 2004
    #6
  7. Steven Craig Basham

    Walt Engle Guest

    I realize that. Recompiling the mnu produces a stripped down version, thus - mns. Everyone has their way of doing things. If
    I were working for a company and customizing the menu, I would probably do it with the mns file. BUT, I would delete the mnu
    file for fear someone would re-load it. THEN, I would delete the mns file (once recompiled) so that no one would try to
    change it.
     
    Walt Engle, Dec 20, 2004
    #7
  8. Steven Craig Basham

    Tom Smith Guest

    Walt, I consider that operator error, since you get a warning and would have
    to hit "yes" or whatever to confirm the file overwrite. A simple and
    foolproof way to completely prevent this error is to not have an MNU file
    anywhere in sight.

    None of our users has any MNU files on their computers. They couldn't make
    this error if they tried. I don't include any MNU files in our standard
    installation. Acad doesn't use them, so neither do I.

    As I've said repeatedly, editing and maintaining an MNU as opposed to an MNS
    is simply an extra step involving an extra potential for mistakes. If you're
    going to hand-code the toolbars (which is ultimately the only way to get it
    right) you can do exactly and precisely the same thing in either file
    format. The only difference that matters to me is that if YOU control the
    MNS (which is my preference) then any comments you put in it are retained.
    If you let Acad control the MNS -- by letting it make the conversion from
    MNU to MNS -- then your comments are stripped away.

    Aside from that, there's no functional difference in which file you edit. I
    prefer the MNS because it's simpler, eliminates one whole category of
    confusion and possible error, and preserves my comments. But it is false to
    say that making your edits in one format versus the other leads to icon
    problems, and that was what I was responding to.
     
    Tom Smith, Dec 20, 2004
    #8
  9. Steven Craig Basham

    Dommy2Hotty Guest

    Instead of fearing someone reloading the MNU, why not put your customization in the MNU...that way, if someone "accidently" reloads the MNU, it's with what you want them to have anyways? It's pretty fail safe if your custom code is at the top level. Let your code flow down the way AutoCAD processes it all.

    You're right, everyone has their way of doing things...Customizing the MNU has been the only way to keep my code out of AutoCAD's hands. My preference, I guess
     
    Dommy2Hotty, Dec 20, 2004
    #9
  10. Steven Craig Basham

    Tom Smith Guest

    Recompiling the mnu produces a stripped down version, thus - mns

    AutoCAD has always said that MNS means menu source, because that is the file
    that it compiles from. It's also the file that it changes if the user makes
    an interactive changes to the toolbar, and the change in the MNS triggers an
    automatic recompilation. If Acad still thought that the MNU file was the
    basic menu source code, don't you think they'd make the toolbar changes in
    the MNU file?

    The MNS file is "stripped down" in only one way: if you let Acad create an
    MNS from an MNU, any comments will be deleted. If you maintain and control
    the MNS file yourself, without an MNU anywhere in the picture, then your
    comments are preserved.
    it with the mns file. BUT...

    Most of the reasons for my positions stem from the fact that I have to
    support dozens of users and still get some work done myself. I don't get to
    do things in a one-man fashion. Keeping things trouble-free and easy to
    maintain is a big priority. I also need a dead simple, fast method of
    installation.

    Nobody has any MNU file whatsoever on their computer -- that's one potential
    problem eliminated. When I make a change in the company menu, I redistribute
    the MNS. Unlike an MNU, the MNS will automatically trigger a recompilation
    if it's newer than the MNC. Obviously, I could distribute the compiled MNC
    and MNR files instead, but that would be two files instead of one.
    Distributing the one MNS is simpler. It will recompile the next time the
    user starts Acad, completely eliminating any need to unload and reload
    anything.

    You can't prevent a menu change by eliminating the MNS. If an user makes a
    toolbar change without the MNS present, an MNS will be created. If you want
    to try to prevent this, you have to do it in other ways, such as by means of
    network permissions.

    I don't bother with this, because it has never been a problem. Everyone has
    the full standard Acad menu, the Express Tools partial, our company-standard
    partial, and a "user" partial menu which thay can customize if they want.
    (Again, I use the partial menu approach because it is infinitely faster,
    easier, and simpler than modifying the mammoth Acad menu.) Everyone knows
    the company menu gets updated regularly, so they don't waste time trying to
    modify it -- they know their changes will be wiped out on the next update.
    However, they have complete free rein in modifying their personal partial
    menu any way they want.

    So far, nobody has ever had a problem with this. The ones who like messing
    with toolbars can do so without causing any harm. The others don't even use
    the personal menu.
     
    Tom Smith, Dec 20, 2004
    #10
  11. Steven Craig Basham

    Tom Smith Guest

    Instead of fearing someone reloading the MNU

    The problem doesn't exist if you don't have any MNU. Then you and Acad are
    both editing and maintaining the same file, instead of fighting over which
    is the "real" menu.
    hands

    Again, you're saying things that just don't seem to make sense. When you
    edit the MNS (menu source) code yourself, Acad compiles what you wrote. When
    you force it to create the MNS from an MNU you have edited, you are
    surrendering a slight level of control by letting Acad destroy your
    comments, instead of deciding for yourself whether you want your code
    commented. How is that keeping your code out of their hands?
     
    Tom Smith, Dec 20, 2004
    #11
  12. Steven Craig Basham

    Walt Engle Guest

    See my previous post - that's what I do - customize the mnu file.
     
    Walt Engle, Dec 20, 2004
    #12
  13. Steven Craig Basham

    Dommy2Hotty Guest

    One last comment...

    Let's say you created a company toolbar in your MNS with some elaborate macro on a button in it. Now the user messes around with the macro and saves the changes. The changes mess up the functionality. How does that user get back the original? I guess he could call you up and have you re-distribute it to him/her, or get it from another co-worker. But you're out of town and he/she has no access to others files. Having the ability to reload from the MNU would be nice right about now...
    Code:
    [Reload this menu]^C^C^C(command "menuunload" "RussCarlsonPartial");+
    (command "menuload" "C:/AutoCAD_Custom/Menusupport/RussCarlsonPartial.mnu");
     
    Dommy2Hotty, Dec 20, 2004
    #13
  14. Steven Craig Basham

    Tom Smith Guest

    Now you're just trying to make things up. I can't imagine that any office
    would ever run in the chaotic and thoughtless manner that you're describing.

    The master copy of our MNS, and all of our other customizations, are kept in
    a network folder which is read-only for everyone except me, my boss, and the
    network admins. Of course there are backups elsewhere. Everyone knows that's
    where the current standard resides, and everyone has read-only access to it.

    To repeat, all of our users understand they can modify their own personal
    menu, and they aren't supposed to modify the company menu. And, again, this
    has not ever been a problem. What you're speculating about has never
    happened. But if you want to play hypotheticals, they would simply copy the
    "master" MNS from the network folder and overwrite their bad version. They
    wouldn't need to call me in order to do this, whether or not I'm in the
    office.

    Our office always has "backup" people trained on every specialized task, so
    there is always someone available to help if the primary go-to person isn't
    available. In terms of CAD support, I keep about one out of every four or
    five CAD users -- the brighter 20% or so -- trained in how to install, set
    up, and maintain our CAD system. They answer most questions for their
    co-workers, so I only get called in if it's a tough question. This helps me
    manage my time, it helps promote a more knowledgeable staff, and it
    guarantees that things will run smoothly if I'm gone.

    The average user might not know that they might need to delete their bad MNC
    and MNR in order to force the good MNS to recompile. (Optionally, of course,
    they could copy down the good versions of all three files to avoid this.)
    But no more than two seats away in either direction will be someone who does
    know this. So far, none of these hypotheticals has ever actually occurred.
    Besides, everbody in the office knows that if all else fails, they could
    simply copy the whole customization folder from the network to their local
    drive, restart Acad, and everything will be normal.

    Having an MNU anywhere on the scene, for any purpose whatsoever, would still
    be completely useless right about now. There's no MNU, dude. There never
    was one. Why are you talking about reloading something that doesn't exist?
    How would that be better?

    You're trying to insist that having a "U" on the end of the file extension
    somehow makes it the bulletproof archival copy of the menu. That's not true.
    How you manage the source file -- regardless of whether you name it MNU or
    MNS -- is what makes it secure. The MNS approach has several advantages, in
    terms of simplicity and avoidance of errors, which I've described. But the
    supposed differences in functionality which you keep tossing out just aren't
    there.
     
    Tom Smith, Dec 20, 2004
    #14
  15. Steven Craig Basham

    Walt Engle Guest

    To each his own. However, always remember there's no more violent or deceitful
    animal than a human and given the opportunity, he (and sometimes, she) will do
    whatever possible to "alter" things - whether mnu or mns and regardless of where
    the original is stored. Would you bet your life there are only a handful of
    people who have access to your read-only files?
     
    Walt Engle, Dec 20, 2004
    #15
  16. Steven Craig Basham

    Tom Smith Guest

    To each his own. However, always remember there's no more violent or
    deceitful
    Walt, I don't know if I'd "bet my life" on the sun coming up in the morning,
    but then I haven't needed to. My life doesn't depend on that one read-only
    copy of the menu files either. They're as secure as anything else on the
    network, which is as secure as a highly trained IT staff and a whole lot of
    money can make them, and they're backed up redundantly off site, along with
    everything else, in addition to my personal backups. If any unscrupulous
    psychopath decided to attack our network, there are many gigabytes of data
    that are far more immediately valuable than my MNS files. We have an IT
    department to worry about things like that.

    Having an individual go insane on the job hasn't ever happened, in my
    experience, but we have things like company policies, laws, policemen, and
    courts to deal with that if it does. I'm not losing any sleep over it. Our
    company has had great success with a positive approach to personnel
    management. We pick people very carefully, and it's based as much on human
    factors as on technical knowledge. I would imagine that if an employee
    harbored "violent or deceitful" tendencies, they would reveal themselves in
    a myriad of other ways besides fiddling with menus, and it would be
    addressed appropriately.

    And, once again, this line of speculation has nothing to do with any
    differences between MNS and MNU files. The exact same issue or non-issue of
    file security would apply regardless of the file extension.
     
    Tom Smith, Dec 20, 2004
    #16
  17. Steven Craig Basham

    Dommy2Hotty Guest

    man...really stickin' it to the 20 year old...maybe you can't imagine an office running like that, but I'm sure there are offices like that. Not everyone is as highly trained as you might be. You have to think about the possibities...what if you wrote a custom menu and sold it to a different company in a different state? Could you be certain someone there wouldn't mess with his new custom toolbars and not mess them up?

    I'm not saying either way is right or wrong, but I see an advantage in putting the code into a file that overwrites any changes the user could have made to the toolbars contained within.

    If I code a new toolbar, I let AutoCAD write it to the MNS, but then I pull out the code and put it in my MNU and edit the bitmap to look for the one I made. Makes migrating a lot easier.

    Either way...you'll do it your way, I'll do it my way, and we'll both be happy with it.
     
    Dommy2Hotty, Dec 20, 2004
    #17
  18. Steven Craig Basham

    ecable Guest

    I also customize the mnu file and keep several copies in different locations. After loading the mnu, I copy the mns, mnl and mnc to the network folder where everyone is mapped for the menu.
     
    ecable, Dec 21, 2004
    #18
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.