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
)
Public Shared Function GetDocumentIcon (
filePath As String,
size As Size
) As Bitmap
Parameters
- filePath
- Type: SystemString
Filepath to examine. - size
- Type: System.DrawingSize
Return Value
Type:
BitmapAn icon bitmap on success or null on failure.
Caller is responsible for disposing of the image.
See Also