Get Preview Bitmap Example (VBA)
This example shows how to get the preview bitmap in a SolidWorks document.
It is assumed that the SolidWorks c:\calls5\block.sldprt part document
exists.
'---------------------------------------------
Option Explicit
Dim swApp As SldWorks.SldWorks
Sub main()
Set swApp = Application.SldWorks
Dim p As stdole.StdPicture 'See
MSDN for details about the StdPicture object
Set p = swApp.GetPreviewBitmap("C:\calls5\block.sldprt",
"Default")
Debug.Print p.Handle
Debug.Print p.Height
Debug.Print p.Width
Debug.Print p.Type
End Sub