0 Replies Latest reply on Oct 18, 2015 6:40 AM by Amen Allah Jlili

    GetPreviewBitmapFile save preview bitmap with strange colors

    Amen Allah Jlili

      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?