revit-api

Icons on the ribbon do not appear


I'm just writing my own add-in with RevitAPI and ran into a problem with the icon. Namely, the icon loads correctly, but it is not visible. Instead of the icon I see a transparent rectangle.

var myicon = new BitmapImage(new Uri(dll_path + "my_icon.png"

Has anyone had a similar problem?


Solution

  • I wrote about it in the tutorial, unfortunately the Polish language. Download yourself the icons from the tutorial, open in Gimp replace the image and export with the same settings. Link to the tutorial I wrote - you can use the translator :) Revit API - ribbon tutorial

    What you need to do:

    1. download 16x16px or 32x32px icons from the article.
    2. open the icons in GIMP
    3. modify the appearance or paste your icon
    4. export the icons to .png without changing the settings
    5. paste the icons into the dll_path folder