Saving the thumbnail image of an Inventor document as a file of your disk might be a bit tricky.
Here is how to do it in C#. The code will save as a .jpg but saving to other formats will be very easy, by simply changing the filename and the ImageFormat enum:
[DllImport(
"oleaut32.dll",
EntryPoint = "OleSavePictureFile",
ExactSpelling = true,
PreserveSig = false,
SetLastError = true)]
public static extern void OleSavePictureFile(
stdole.IPictureDisp Picture,
[MarshalAs(UnmanagedType.BStr)] string filename);
void SaveThumbnail(Document doc)
{
stdole.IPictureDisp pic = doc.Thumbnail;
string filename = System.IO.Path.GetTempFileName();
//Temp file is a .wmf
OleSavePictureFile(pic, filename);
Image img = Image.FromFile(filename, true);
img.Save(
@"C:\Temp\thumbnail.jpg",
System.Drawing.Imaging.ImageFormat.Jpeg);
System.IO.File.Delete(filename);
}