AnsweredAssumed Answered

GetPreviewBitmapFile save preview bitmap with strange colors

Question asked by Amen Allah Jlili on Oct 18, 2015

I'm developing C# VSTA macro for our manufacturing department.

I'm using SldWorks.GetPreviewBitMapFile to save a bitmap preview of the selected model and show it in the picturebox as shown below:

enter image description here

The code looks fine and execute fine except for the strange colors:

bool status = swApp.GetPreviewBitmapFile(filepath, configuration, "D:\\preview.bmp"); 
.ImageLocation = "D:\\Preview.bmp";
.SizeMode = PictureBoxSizeMode.StretchImage;

Has anyone had a similar problem and what's the remedy?