Assigning .BMP's to toolbar buttons

Discussion in 'AutoCAD' started by bthatcher, May 25, 2004.

  1. bthatcher

    bthatcher Guest

    When creating new toolbar buttons and assigning existing bitmaps from the customize dialog, button properties tab, edit button image option, you can open and browse to the icon you want. From this point what is the intended way to assign it to that button. I don't want to 'Save as..', i have already created it and saved it where i want. And 'Save' seems to be the only other option. However it renames it and puts it where ever it wants. Sometimes in the directory with the original, sometimes not. And none of my original bitmap names are used in the .MNS file. Am I missing somthing? This has been an issue for my since at least R14 and was hoping it would work better by now.
     
    bthatcher, May 25, 2004
    #1
  2. bthatcher

    Tom Smith Guest

    Read Mark Middlebrook's article
    http://www.markcad.com/autocad/acadtoolbars.htm "AutoCAD toolbar
    customization the right way Or: The Toolbars dialog is for wimps!"

    Basically he says, since R14, the only good way to do this is edit the mns
    file directly. If you have the bmp and the macro, just go into the mns &
    make it exactly the way you want. It's faster and it works. Don't waste time
    fiddling with the on-screen "customization" gizmos, which have always had
    the fundamental problems you note.
     
    Tom Smith, May 25, 2004
    #2
  3. bthatcher

    R.K. McSwain Guest

    Could not agree more. I always edit the *.MNU file then reload, and I never have surprises.
     
    R.K. McSwain, May 25, 2004
    #3
  4. bthatcher

    Tom Smith Guest

    Could not agree more. I always edit the *.MNU file then reload, and I
    never have surprises.

    Not to re-start an old controversy, but Middlebrook also explains clearly
    why customizing the mns rather than the mnu is the preferable approach.

    One additional advantage which he doesn't mention is that comments are
    preserved in an mns file when it's compiled. If you put comments in an mnu
    and let Acad produce an mns from it, all comments are stripped out. Comments
    are a good thing.

    And in jugglng file types, there is always the risk of overwriting an mns by
    forcing the compilation from an mnu. The safest, simplest, easiest way to
    deal with menus is never touch an mnu at all.
     
    Tom Smith, May 25, 2004
    #4
  5. Bellow is my answer of similar question several days ago. Only thing I will
    add is that the difference between SAVE AS and SAVE buttons is this:
    SAVE AS - allow you to save as bmp. file (if you already have it, you don't
    have to use this)
    SAVE - AutoCAD saves a COPY of this picture for his own purposes. You HAVE
    to click this in order to use the picture (no matter if you created it or
    loaded it from file). From this point AutoCAD using his copy. And this is
    where the mess starts. See below.

    This is because AutoCAD saves the picture as *.bmp files with just
    a number for name and sometimes they are on different folders (one in
    Express folder other in Support folder - depend in which toolbar you placed
    it) but with the same name/number. To avoid this:
    1. Save As the icon picture somewhere. Click Save too.
    Generally this should be enough, but I had some problems even after this
    point, so my suggestion is to go further with
    2. Open acad.mns file (found in C:\Documents and Settings\<user
    name>\Application Data\Autodesk\AutoCAD 2004\R16.0\enu\Support) and open it
    with notepad.
    Find your button (make search for the name you given to it). The row should
    look something like this:
    ID_UserButton_17 [_Button("User Defined Button", "RCDA8467.bmp",
    "RCDATA_16_BLANK")]^C^C<your macro here>
    Replace the *.bmp picture name (in this example RCDA8467.bmp) with the
    picture name you had given to the icon when did Save As. Close the file.

    Generally avoid placing custom buttons in Express toolbars.
    Hope this will help.
    John



    customize dialog, button properties tab, edit button image option, you can
    open and browse to the icon you want. From this point what is the intended
    way to assign it to that button. I don't want to 'Save as..', i have
    already created it and saved it where i want. And 'Save' seems to be the
    only other option. However it renames it and puts it where ever it wants.
    Sometimes in the directory with the original, sometimes not. And none of my
    original bitmap names are used in the .MNS file. Am I missing somthing? This
    has been an issue for my since at least R14 and was hoping it would work
    better by now.
     
    John Georgiev, May 25, 2004
    #5
  6. bthatcher

    Tom Smith Guest

    Replace the *.bmp picture name ...

    It seems to me that since you need to edit the mns file anyway to fix the
    bmp filename, you would save time by not using the "customization" interface
    at all. Simply place the bmp where you want it, on the search path, and edit
    the mns file to show the correct filename.
     
    Tom Smith, May 25, 2004
    #6
  7. bthatcher

    TCEBob Guest

    Agreed. But the customization bitmap editor is convenient, if primitive. Can
    Paint be set up with a grid to work the same way? Or what other editor?

    rs
     
    TCEBob, May 25, 2004
    #7
  8. Tom, what I mean is to replace the filename AutoCAD had created when you
    click SAVE in the editor (the one with the numbers) with the name of the
    real *.bmp file you saved. Of course it should be on search path and you are
    right - I forgot to mention this.
    The explanation was for somebody not too familiar with the menu files. It is
    simplified mixture (or maybe not) between user interface and menu file
    editing. I'm creating my custom buttons directly editing the menu file
    because it is one I build specifically for my company and is stored on the
    server - all the computers loading it from there. But I still prefer to
    create the picture with the CAD button editor just because this way I'm sure
    it is in right format and size.
    John
     
    John Georgiev, May 25, 2004
    #8
  9. bthatcher

    Tom Smith Guest

    Agreed. But the customization bitmap editor is convenient, if primitive.
    Can
    Sure. Sometimes I use the little editor to paint an icon, save it, then go
    track it down & rename it, etc. -- as John says, there is a certain
    simplicity to this. But realistically, I don't have a lot of trouble using
    Paint on an image 16 pixels wide without a visible gridline. And the old
    freeware version of Paint Shop Pro, my preferred tool, does show a visible
    grid when zoomed in, no setup required. It also gives you the option of
    zooming in further to a magnification where it's easier to draw.
     
    Tom Smith, May 25, 2004
    #9
  10. bthatcher

    R.K. McSwain Guest

    But the comments remain in the .MNU, so I guess I don't understand the issue there. What difference does it make where the comments reside?

    I don't understand your point there. You are actually making my point. If a person spends time editing an .MNS file, then for whatever reason, the .MNU gets reloaded - then the changes in the .MNS are gone. To me, it's much safer to edit the .MNU since it will never be overwritten (at least not my AutoCAD). Basically, I ignore the .MNS, .MNC, .MNR files.

    It's similar to if you were trying to make a .PDF document and you are using MsWord to edit the document. You wouldn't open Acrobat to make changes once you made the .PDF, you would make your edits in MSWord, then export a .PDF again.
     
    R.K. McSwain, May 25, 2004
    #10
  11. bthatcher

    R.K. McSwain Guest

    Who said there was?
     
    R.K. McSwain, May 25, 2004
    #11
  12. bthatcher

    mark Guest

    it is not safe to say search path, autocad puts them on the search path too,
    u should say, search path and on top in the list of the search path,
    and make sure u remove conflicting ones from the "current" or "drawing"
    or the "acad.exe" folders, which by default are above all the other search
    paths

    mark
     
    mark, May 25, 2004
    #12
  13. bthatcher

    Tom Smith Guest

    Who said there was?

    I don't think there is either, but this is an area where I've noticed people
    have deeply held "preferences." I think that the whole menu development
    cycle is expedited and simplified by deleting the mnu file altogether, and
    dealing exclusively with the mns "source" file. (Keeping a backup somewhere,
    of course, as you need to do no matter how you approach it).

    But it can be made to work in the opposite fashion too, and to some folks
    that makes more sense. I've learned that people can be as passionate about
    this as they are about the age-old F1 and ESC wars :)
     
    Tom Smith, May 25, 2004
    #13
  14. bthatcher

    R.K. McSwain Guest

    As far as I'm concerned - the .MNU file *is* the menu 'source' file. It can only be written to by me - not the program.

    I have seen too many people spend hours customizing the menu using the graphical methods (which of course only updates the .MNS), then at some point in the future, for whatever reason, reload the MNU and then wonder what happened....
     
    R.K. McSwain, May 25, 2004
    #14
  15. bthatcher

    mark Guest

    i agree 100% w/ RK
    i do not like AutoCAD or anybody else for that matter,
    to modify my files, when somebody tries to customize
    a custom menu file, the MNU files stay the same always,
    so the user can always revert back to the original menu
    by reloading the MNU, else he or she, can mess around with
    their MNS files as much as they like.

    mark


    As far as I'm concerned - the .MNU file *is* the menu 'source' file. It can
    only be written to by me - not the program.

    I have seen too many people spend hours customizing the menu using the
    graphical methods (which of course only updates the .MNS), then at some
    point in the future, for whatever reason, reload the MNU and then wonder
    what happened....
     
    mark, May 25, 2004
    #15
  16. ....

    I have seen too many people spend hours customizing the menu using the
    graphical methods (which of course only updates the .MNS), then at some
    point in the future, for whatever reason, reload the MNU and then wonder
    what happened....



    Exactly! This is the reason why Tom and I advocate just deleting the .mnu
    file (or getting it off the search path). No .mnu file to muck up the works,
    if someone is a doof. I have seen far more posts about "Help! I've lost my
    toolbars!" than I have about "Help! I have no backup of the .mns file!"

    2 small pennies from me.
     
    R. Robert Bell, May 25, 2004
    #16
  17. bthatcher

    OLD-CADaver Guest

    << I have seen too many people spend hours customizing the menu using the graphical methods (which of course only updates the .MNS), then at some point in the future, for whatever reason, reload the MNU and then wonder what happened....>>

    That's more an argument for limited access to menu editing than anything else. If you don't know what you're doing, maybe you shouldn't. But that, too, is just an opinion.

    For our base and client menus, we use the MNU as a backup to the MNS. We'll use the graphical interface or even NOTEPAD to edit the MNS. Then we'll "bounce-check" it for a couple days to make sure there's no "gotchas", if it passes we copy the new MNS over the old MNU that's kept in a different directory.

    These menus, however, are blocked from editing by the users. Only the cad management team has access to these. Each user has a personal menu that he can menuload behind the others for his personal modifications. The user is "on his own" with these menus.
     
    OLD-CADaver, May 26, 2004
    #17
  18. bthatcher

    R.K. McSwain Guest


    Hmmm, taking it off the search path solves...? All someone has to do it type MENU and browse to it.

    Exactly, they lose their toolbars because they do the grapical edits, the reload the MNU. If they were editing the MNU to start with, reloading it would not cause them to lose anything :)


    I see your point though - I just have a different way of looking at it.

    Have a good one.
     
    R.K. McSwain, May 26, 2004
    #18
  19. You too! Enjoy your weekend. 8^D

    --
    R. Robert Bell



    ....

    I see your point though - I just have a different way of looking at it.

    Have a good one.
     
    R. Robert Bell, May 26, 2004
    #19
  20. I'm 100% agree with the OLD guy. In company with more than 10-15 CAD
    drafters you cannot afford to give them absolute freedom - this will create
    a mess.
    In my company I keep almost the same order - the users are free to edit
    their AutoCAD menus (including creating new toolbars) but Express tools and
    the company's custom menus and toolbars can be modified only by me and one
    more person. And because the company's menu files and toolbars are loaded to
    all workstations from the same place (from the server) the only freedom any
    drafter have is to close some of the company toolbars if he don't want them.
    If somebody modify a company's toolbar - this will affect all workstations
    and this is why it is prohibited.


    graphical methods (which of course only updates the .MNS), then at some
    point in the future, for whatever reason, reload the MNU and then wonder
    what happened....>>
    else. If you don't know what you're doing, maybe you shouldn't. But that,
    too, is just an opinion.
    We'll use the graphical interface or even NOTEPAD to edit the MNS. Then
    we'll "bounce-check" it for a couple days to make sure there's no "gotchas",
    if it passes we copy the new MNS over the old MNU that's kept in a different
    directory.
    management team has access to these. Each user has a personal menu that he
    can menuload behind the others for his personal modifications. The user is
    "on his own" with these menus.
     
    John Georgiev, May 26, 2004
    #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.