Managing menu icons

Managing menu icons

Anonymous
Not applicable
1,781 Views
5 Replies
Message 1 of 6

Managing menu icons

Anonymous
Not applicable

I am editing a custom cuix file and updating icons. However, when I edit the BMP file the associated icon remains as it was. In order to change it I have to save the bmp file with another name and then use the new file in order to update the icon.  Is there another way to do this?

Also, the original icon remains in the CUIX file even after the image file has been deleted. Is there a way to remove these unused icons.

0 Likes
Accepted solutions (2)
1,782 Views
5 Replies
Replies (5)
Message 2 of 6

pendean
Community Legend
Community Legend
Accepted solution
1. How old an AutoCAD version are you using that you still use BMP files for the icons? PNG is the new format with newer versions.
2. Once an icon is loaded, it is stored in the CUIx file and the external file is totally ignored and never tapped again. Just replace with your new PNG files or just recompile your CUIx file from scratch

But... cuix files are just zip files, so if you change the extension to .zip, you can see the CUI contents, including the custom icons which will be .bmp files you previously created. I've never replace them that way, but you could try.

I'm going to ask the forum admin to move your question to the AutoCAD forum, LISP is not going to help you here IMHO.

0 Likes
Message 3 of 6

Anonymous
Not applicable
Accepted solution

I'm using AutoCAD 2019 but it's not the age of the program but the age of the menu.

Let me give you some background: I first developed this menu 30 years ago in AutoCAD Release 9 with the "MNU" format and it's been mostly working fine with a few tweeks at some version releases. For me the MNU format was easier to work with and I didn't have much need or time to get into the CUI format until now.  Let's just say I'm comparatively new to the CUIx format. The BMP icons are not really a problem except I wanted to upgrade the look and add some new and remove some old commands that are not used anymore.

So I have started to change some icons to PNG images. I used the term "BMP" generically as the image format isn't the problem I've been having. The problem is, I create the image and assign it to a command. Then if it doesn't look quite right I modify it and save it, but it doesn't update in AutoCAD. I find that I have to save to a different name and load the file with the new name and repeat until the icon looks good. OK, but the old files were still there in the CUI file. So I searched the forums for "Icon Manager" with not much for results so I started this thread. 

Then, on my own I stumbled on the "Image Manager". The manager has 3 functions. "Import", "Export", & "Delete". The file list shows which files are not referenced and the delete function works fine so that problem is solved.

If you Import a file with the same name into the file, it does not replace the old file. It doesn't do anything really. I tried your "ZIP" file solution and it works but is a little "clunky" so I'll do that until I find a better solution. I guess this is solved also.

 

Thanks!

Message 4 of 6

cbgoings
Explorer
Explorer

I'm having the same trouble. If I edit an icon file, it doesn't reflect when I reload the menu, even if I first delete the cuix file, and load from a modified mns file.  It seems AutoCAD is storing the image file somewhere and won't update it.  Has anyone found a solution to this they could share?  If I create a new cuix file, I can copy the correct image files into it and that does work, but if I delete the cuix file again and recreate from an mns file, the old images are there.  

0 Likes
Message 5 of 6

cbgoings
Explorer
Explorer

I may have determined why this is happening.  In my case, I'm still using the old mns file to load the toolbars, mainly because it is easier to manage changes for given it is a text file.  However, I noticed using the Image Manager that the icons where 32x32.  I think AutoCAD is using the 32x32 icon and scaling those down for the small icon view, and totally ignoring the 16x16 image.  If I modify the 32x32 image file, and delete the cuix file, then reload the mns file, the images in the reloaded toolbar update.

0 Likes
Message 6 of 6

Sea-Haven
Mentor
Mentor

Use menuload and mnu file should force a full rebuild of the cuix.

0 Likes