TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: kenkrupa on April 19, 2014, 02:25:25 PM

Title: 2015 color scheme switching
Post by: kenkrupa on April 19, 2014, 02:25:25 PM
Trying to provide alternate icons for the new dark scheme. I'm not equipped for providing resource dll's, as suggested elsewhere, so I came up another scheme. My idea is to provide two cuix files, and swap as needed between a MenuUnload and a MenuLoad. This works as expected for the ribbon icons, but the toolbars (using the same bmp's) seem to remain unchanged. I have tried deleting the mnr file in between also, and AutoCAD creates a new one, but still no change in the toolbar button image. Going to CUI to look at it, the toolbar icon is shown as the correct one, same as for the ribbon. But so far I can't find how to make the toolbar images update. Anyone know what's going on here? Where the heck can the toolbars be getting the wrong images from?
Title: Re: 2015 color scheme switching
Post by: kenkrupa on April 19, 2014, 03:07:52 PM
Found the answer myself! (Even a blind squirrel will find a nut once in a while.) The ribbon was always getting its images from the bmp's in the cuix, but the toolbars were finding the bmp files still on my search path. Once I removed them, the toolbars would also take the images from the cuix, and give the expected result. With that, the swap, together with deleting both the .mnr and _light.mnr file in between, seems to work.
Title: Re: 2015 color scheme switching
Post by: Crank on April 19, 2014, 03:21:56 PM
The 2 color schemes already use different .CUIx files.
YOUMENU.cuix for the dark icons and YOURMENU_light.cuix for the light ones.

As usual this isn't finished by Autodesk, because the CUI doesn't have the option to define 2 sets of icons.
If you're using .dll files for your icons then you'll have to create a YOURMENU.dll and a YOURMENU_light.dll to make it work.

If making 2 .dll files is to much work (my cuix has about 1000 special icons :P) then this is what you can try (NOT TESTED):In theory this should work , but you'll have to do it all over again if you want to change something. So I'll stick to the light icons until Autodesk solves this. ;)
Title: Re: 2015 color scheme switching
Post by: snownut2 on April 19, 2014, 03:22:21 PM
(Even a blind squirrel will find a nut once in a while.)

Why do you think they hide their nuts in all sorts of places in the fall, so no matter where they look they have a good chance of finding them through to winter months..(at least in the snow belt)
Title: Re: 2015 color scheme switching
Post by: kenkrupa on April 19, 2014, 03:28:14 PM
The 2 color schemes already use different .CUIx files.
YOUMENU.cuix for the dark icons and YOURMENU_light.cuix for the light ones.
I did not know this. I'll see what I can do with it. Thanks.
Title: Re: 2015 color scheme switching
Post by: kenkrupa on April 19, 2014, 04:51:08 PM
The 2 color schemes already use different .CUIx files.
YOUMENU.cuix for the dark icons and YOURMENU_light.cuix for the light ones.
I did not know this. I'll see what I can do with it. Thanks.
Well, I don't see anything happening with a mymenu_light.cuix file. I see AutoCAD creating a mymenu_light.mnr file, whether I have a mymenu_light.cuix file or not. But I don't see it doing anything with the mymenu_light.cuix file.

This is what does work for me. I created the two .cuix versions, opening the cuix with WinZip to get the right bmp's in each. I can then unload one, swap the two files, delete both mymenu.mnr and mymenu_light.mnr, and reload the cuix (now swapped). So, I will go with this, and create a routine to make it happen.
Title: Re: 2015 color scheme switching
Post by: Crank on April 20, 2014, 04:03:08 AM
If you delete the .mnr files MYMENU.cuix is recompiled again. Then MYMENU.cuix and MYMENU_light.cuix will have the same icons again.
Like I've descibed you'll have to split both versions first, so both .mnr files contain different sets of icons. Then protect them so they can't be compiled.