GetPreviewImage Method


IExternal Data Manager Server Get Preview Image Method

Retrieves the handle of preview image.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
IntPtr GetPreviewImage(
	Document document,
	ExternalDataManagerDataItemId dataId
)

Parameters

document Document
The document.
dataId ExternalDataManagerDataItemId
The id of data.

Return Value

IntPtr
The handle of the preview image.
Remarks
Provides a WIN32 HBITMAP handle (or platform equivalent) representing a small preview (typically 256X256). The dialog takes ownership and will call DeleteObject when done. Return nullptr if the server cannot supply a preview or if generating it would be expensive.
See Also
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →