I am currently working creating some custom ribbon menus. For these menus we wanted special icons. A coworker created the icons using some websites by first using Microsoft Word (sine the icons were only using text as shown in the screenshot). He converted the Word doc to a .jpg, then converted that to a .ico file. The converted created the 3 required sizes plus a few additional sizes. The .ico files were imported into a .dgnlib which was placed in a location being pointed to by MS_GUIDGNLIBLIST. Upon applying the icons to the menu items I could se the name of the icon, but the image would not appear, although they look fine in the Icon Selector window. I found a few old threads where users were reporting the same issue but I did not find any real definitive solution.
Looking back in the Icon Selector I noticed the Icon Properties which shows the various sizes of the icon defined and I verified the 3 required sizes were present. I had to scroll down to see the additional sizes when I noticed that there was a size defined as
XXXXX 0 width 0 height.
I ended up deleting that size which corrected the issue. I did not see this posted anywhere else so I thought I would post this in case others run into this same issue. It is apparent that Micorstation uses the last defined size in the list of the icon sizes but, I guess it may depend on whether you set the icon size to small, medium or large in the menu settings.
Can anyone provide some insight as to how the icon sizes are selected by the software? I'm not sure what the default setting is when you create a new Drop-down, Menu Item or Sub-Menu item. I believe it is usually set to Large when I create these in the Customize Ribbon dialog.
I cannot immediately find this documented, but experiment suggests:
The default size appears to vary and to be driven by the tool that is added. I don't know what controls the size of new buttons, mine are appearing as small.
mwlong said:Can anyone provide some insight as to how the icon sizes are selected by the software?
MicroStation ribbon is based on Telerik library, that use 32x32 and 16x16 icons as default sizes (mentioned already by Marc Thomas).
I agree that importing .ico files into DGNLIB works weird sometimes.
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Ok, thanks for the information. I was making an assumption that the last one listed seemed to be the default. If that is the case then I would also assume that if only the 3 sizes mentioned are valid for Microsation/ORD and any other size is defined and selected as the default, the icon would appear blank as well.
I'm not too concerned about this issue. Last time I created a custom icon was back in the v8 2004 days with the built-in icon creator. These icons were being created at the request of a client.
Microstation CONNECT 10.17.00.209
ORD CONNECT 2021 R1 10.10.1.3
Microstation v8i SS 10 08.11.09.919
Power InRoads v8i 08.11.09.615
Perhaps the following will help: