Prod.: Engine, ver.: 6, ID: 60001775, HowTo : How can I get the preview image saved in a vdml or vdcl file

HowTo : How can I get the preview image saved in a vdml or vdcl file

Article60001775
TypeHowTo
ProductEngine
Version6
Date Added8/14/2012
Submitted byJens Scheffler
Keywords

Subject

How can I get the preview image saved in a vdml or vdcl file

Summary

How can I get the preview image saved in a vdml or vdcl file ?

Solution

You can use the GetImageFromFile method of vdDocument to get the preview image. Note that only some drawings contain such a preview image!

Try a code like :
private void button12_Click(object sender, EventArgs e)
       {
           Image img = doc.GetImageFromFile(@"C:\test\example.vdcl");
           pictureBox1.Image = img; // PictureBox1 is a .NET picture box control in the form !
           pictureBox1.Update();
       }