I want to create previews for each solidworks models in VB6.
I use the swApp.GetPreviewBitmapFile to create bitmap files,it seems that this is the only way to create preview file for sw models in VB6(as I know)
The bitmap files has been created,but they seem to have been broken,the back color of the bitmaps is random,they are not what I want.
I also tested this method in solidworks VBA,the files that created is also not normal.
There is another method swApp.GetPreviewBitmap, it create bitmap(stdole.StdPicture) and works well,but it can be use only in VBA environment.
Is there anyone have the same problem?
The attached Pictures blew are the bitmapfiles that created by swApp.GetPreviewBitmapFile
Today I Solved this problem by myself !
I create a vba macro to export all preview BMP files of an assembly model and its sub models to a folder,
after open an assembly model in Solidworks, in my standalone app,use swapp.runmacro(...) to run this macro in solidworks,
and then the BMP files of all models (include sub models) is ready for me!
When I need a preview of a model,just find its BMP file and show it !
and before my standalone app exit ,delete all the BMP files.
This is a perfect solution!