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"); 
      pictureBox1
      .ImageLocation = "D:\\Preview.bmp";
      pictureBox1
      .SizeMode = PictureBoxSizeMode.StretchImage;
      pictureBox1
      .Refresh();

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