Every time I created a ribbon button, I was faced with the task of creating appropriately scaled icons for it to populate the PushButton large and small image icon properties LargeImage and Image.They seem to expect a 32 x 32 and 16 x 16 icon, respectively.I finally solved that once and for all by implementing a couple of methods to perform automatic bitmap scaling BitmapImageToBitmap convert a BitmapImage to Bitmap BitmapToBitmapSource convert a Bitmap to a BitmapSource ResizeImage resize an image to the specified width and height ScaledIcon scale down large icon to desired size for Revit ribbon button Usage sample putting them together...
Click here to view the entire blog post.
Announcement
Collapse
No announcement yet.
Building Coder: Scaling a Bitmap for the Large and Small Image Icons
Collapse
X
Related Topics
Collapse
-
The Revit database contains a number of undocumented relationships, and it can be challenging and useful to discover them. Christian Tonn of kubit presents...
-
Channel: Blog Feeds
September 4, 2014, 09:15 AM -
-
I had my first haircut since January this weekend :-) The reason I had such a long break from that task is that I shaved my head completely in January....
-
Channel: Blog Feeds
June 4, 2012, 09:45 AM -
-
I recently presented Frode Tørresdal's unofficial custom ribbon button implementation showing how you can add a custom button that Revit knows nothing...
-
Channel: Blog Feeds
July 3, 2014, 09:15 AM -
-
Anyone know why png files in revit are the wrong size. Does this happen to anyone else? I'll have a seal I'm adding to a titleblock that is 1.78"...January 20, 2020, 06:11 PM
-
Let's start the week with some ribbon button item and encoding topics How to create 24x24 stacked ribbon items Update on moving a ribbon button between...
-
Channel: Blog Feeds
February 25, 2020, 10:45 AM -
Monumetric Footer In-screen
Collapse