How to update bmp image buttons

How to update bmp image buttons

ASCunningham
Collaborator Collaborator
3,316 Views
16 Replies
Message 1 of 17

How to update bmp image buttons

ASCunningham
Collaborator
Collaborator

Hello, I'd like to make changes to our custom button images. Back in the day I would edit and save the bmp file. Then I would delete the assoicated .mnr file, open autocad and the changes would be recompiled.

 

I cannot figure out how to accomplish this anymore. What is the preferred method now? I do have a lot of changes to make so I would hate to have to go through the cui editor now to update all the images. There has to be a quicker way?

0 Likes
Accepted solutions (1)
3,317 Views
16 Replies
Replies (16)
Message 2 of 17

pendean
Community Legend
Community Legend
The method has not changes in 20+years, explore here https://www.google.com/search?q=autocad+tip%3A+change+icon+button+image

Ask afterwards if you get stuck anywhere.
0 Likes
Message 3 of 17

ASCunningham
Collaborator
Collaborator

Your replies have always been less than helpful. I forgot why I don't post on here anymore! You don't think I google searched this 30 mins before I posted the question?

 

Obviously I know how to edit the cui editor, since I stated that.

 

 

0 Likes
Message 4 of 17

pendean
Community Legend
Community Legend

@ASCunningham wrote:
>>>...Obviously I know how to edit the cui editor, since I stated that....<<<
Apparently not enough to do this task. Where exactly did you get stuck then (see the last sentence in my last reply to you)?

 

1) All you do is create an image (your favorite image editor or in CUI)

2) Save a 16x16 or 32x32 size of it s a PNG (ideal) or JPG (or BMP) to a folder in the search path of AutoCAD (ideally one of your own)

3) Add the icon in CUI to the button or macro you want, and done

 

pendean_0-1653416063921.png

 

Where did you get stuck? If you don't know, be more specific in your follow up reply.

0 Likes
Message 5 of 17

ASCunningham
Collaborator
Collaborator

I have about 200-300 buttons that need updating, this is why I don't want to go through the cui editor.

 

I was hoping I could simply update the .bmp files for the button (through MS paint) and have AutoCAD recompile the button images. This used to be accomplished by deleting the associated menu .mnr file, then starting AutoCAD to recreate the .mnr file and have the images update. I believe this stopped working with AutoCAD 2015 menu change to cuix?

 

I would think there has to be a way for AutoCAD to see that the .bmp file has changed and update when loading up the menu?

 

Or is it that once the button image has been loaded into AutoCAD there is no way to update it except through the cui editor?

 

0 Likes
Message 6 of 17

dmfrazier
Advisor
Advisor

@ASCunningham wrote:

I believe this stopped working with AutoCAD 2015 menu change to cuix?

 

I would think there has to be a way for AutoCAD to see that the .bmp file has changed and update when loading up the menu?

 

Or is it that once the button image has been loaded into AutoCAD there is no way to update it except through the cui editor?

 


I haven't had to make changes to custom icons for a few releases, but it appears that this is indeed the "new reality".

Quite aggravating isn't it?

I sympathize, and hope someone here knows of a way to get that "functionality" back.

0 Likes
Message 7 of 17

ASCunningham
Collaborator
Collaborator

Yes vey frustrating. On top of that it appears that the .bmp filename has to be changed in order for the updated image to show up within the cui editor, otherwise the image does not update..... UGH!

0 Likes
Message 8 of 17

TomBeauford
Advisor
Advisor

Now there's two mnr files for each cuix one for the light background (acad_light.mnr) and one for the dark background (acad.mnr). There are also images saved in cuix files. To delete them you need to use the Image Manager Dialog Box (CUI) https://help.autodesk.com/view/CIV3D/2021/ENU/index.html?guid=GUID-11125632-C613-46C5-9D8F-9DA151171... 

 

Make sure you shut down AutoCAD before deleting the mnr files or modifying the bitmaps. Changing just one macro's icon in the CUI should force those mnr files to update. 

 

For them to look as nice as the installed images you should draw them in AutoCAD, use PNGOUT command, then use a free online editor to create transparent backgrounds like https://www9.lunapic.com/editor/ or https://www.online-image-editor.com/.

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Message 9 of 17

dmfrazier
Advisor
Advisor

"Changing just one macro's icon in the CUI should force those mnr files to update."

 

Actually, the MNR files are recreated before you can even get to the CUI editor. (And the icons do not get updated based on the updated BMP file. Thus the aggravation.)

0 Likes
Message 10 of 17

pendean
Community Legend
Community Legend
Yes it is quite a time consuming chore if this is important to you: your masterpieces take time to create.

I too did the same amount of changes a few versions back using a 3rd party image editor called PAINT.NET (still is my favorite freebie), started with a baseline master image, made copies, copy/paste, it handled scaling quite well (I created the originals as 32x32 PNGs, scaled down to 16x16) and so on.

Implementation into CUIx is not difficult, but with the correct level of naming conventions and methodical replacement or attachment to buttons, it can be done.

Figure about a week of your life.

Or you could just not care, quickly tweak existing icons in CUIx, go that route. There is some time savings, but it is clunkier to use.

CUIx 'remembers' an image you upload to it; no easy replacement.
0 Likes
Message 11 of 17

dmfrazier
Advisor
Advisor

"CUIx 'remembers' an image you upload to it; no easy replacement. "

 

Clearly.

What would really be helpful would be information regarding *where* it is remembered and whether or not it can be updated in a more expedient way than thru the CUI interface (you know, like the OP described).

Autodesk giveth, and Autodesk taketh away. (Autodesk works in mysterious ways...)

0 Likes
Message 12 of 17

ASCunningham
Collaborator
Collaborator

Yes that information would be extremely beneficial!!!

So what I stubbled onto is that if I open my .bmp file and make my quick change, I can save it as .png file.

Then in the cui editor I can simply change the filename (it was looking for ie. elecnc08.bmp) by backspacing and just replacing .bmp with .png. 

ASCunningham_0-1653425879980.png

This is pretty quick, but certainly not as quick as the "old" way. I'll still look for anymore helpful information from this post.

 

0 Likes
Message 13 of 17

TomBeauford
Advisor
Advisor

Those images are saved in the cuix files. To delete them you need to use the Image Manager Dialog Box (CUI) https://help.autodesk.com/view/CIV3D/2021/ENU/index.html?guid=GUID-11125632-C613-46C5-9D8F-9DA151171... 

The only other way I can think of would be to make a backup copy of the cuix file then rename the extension to zip then open it so you can delete bitmaps then rename the zip file extension to cuix.

 

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Message 14 of 17

TomBeauford
Advisor
Advisor

Did you delete them using the Image Manager Dialog Box in the CUI? https://help.autodesk.com/view/CIV3D/2021/ENU/index.html?guid=GUID-11125632-C613-46C5-9D8F-9DA151171... 

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Message 15 of 17

dmfrazier
Advisor
Advisor

@TomBeauford wrote:

Those images are saved in the cuix files. To delete them you need to use the Image Manager Dialog Box (CUI) https://help.autodesk.com/view/CIV3D/2021/ENU/index.html?guid=GUID-11125632-C613-46C5-9D8F-9DA151171... 

The only other way I can think of would be to make a backup copy of the cuix file then rename the extension to zip then open it so you can delete bitmaps then rename the zip file extension to cuix.

 


If it's true that the images are saved in the CUIX, then this is apparently the change that occurred some releases ago that the OP and I mentioned earlier, because it used to be (apparently) the MNR files that held this info. This would explain why forcing AutoCAD to regenerate the MNRs no longer works to refresh the icons.

 

Using your CUIX file edit method, if one can delete bitmaps, then could one replace bitmaps just as well?

0 Likes
Message 16 of 17

TomBeauford
Advisor
Advisor
Accepted solution

The MNR files are still compiled to make Ribbon and Toolbar images appear as fast as possible, they've been used for that purpose forever. If deleted the quickest access to reproduce the images are in the cuix file which is really a zip file with cuix as it's extension that includes cui, bmp, png, and xml files.

That's why when you assign a new image to a macro with the same name the old image still appears in the Ribbon or Toolbar. 

 

If you wanted to replace a bunch of images in a cuix with updated ones with the same name accessing it as a zip file to overwrite those files would be the quickest way.

 

Be sure to make a backup copy of the cuix first and close AutoCAD before modifying the cuix file first.

 

I'd recommend always making a backup copy of a cuix file before editing it.

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
Message 17 of 17

ASCunningham
Collaborator
Collaborator

Finally exactly what I was looking for!!!! Thank you for that info.

 

These were my steps.

1. Make a backup of your cuix file

2. Rename cuix to zip

3. Double click on the zip file to open it up

4. Once open you see all the embedded images. I had to delete the old image and copy the new one into the zip file. I could not copy/replace them as this corrupted the file.

5. Close down the zip file and rename it back to cuix

6. Copied my changed cuix file back to network drive

7. Started AutoCAD and new images are now displaying