Revit 2026 API
Element |
Get the preview image of an element. This image is similar to what is seen in the Revit UI when selecting the type of an element.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public virtual Bitmap GetPreviewImage( Size size )
Public Overridable Function GetPreviewImage ( size As Size ) As Bitmap
public: virtual Bitmap^ GetPreviewImage( Size size )
abstract GetPreviewImage : size : Size -> Bitmap override GetPreviewImage : size : Size -> Bitmap
Parameters
- size Size
- The width and height of the preview image in pixels.
Return Value
BitmapSystem::Drawing::Bitmap represents the preview image. if there is no preview image.
| Exception | Condition |
|---|---|
| ArgumentException | The width or height of the size is equal or less than zero. |
See Also