Click or drag to resize

GH_DocumentIOGetDocumentIcon Method

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

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static Bitmap GetDocumentIcon(
	string filePath,
	Size size
)

Parameters

filePath
Type: SystemString
Filepath to examine.
size
Type: System.DrawingSize

Return Value

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