Click or drag to resize

GH_DocumentIOGetDocumentThumbnail Method

Try and extract the preview image of a document. Not all gh/ghx files contain a thumbnail so this function may return null. The document itself is not loaded and rendered, so the thumbnail really has to be part of the file already.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
public static Bitmap GetDocumentThumbnail(
	string filePath


Type: SystemString
Filepath to examine.

Return Value

Type: Bitmap
A preview bitmap on success or null on failure. Caller is responsible for disposing of the image.
See Also