ARUP.IssueTracker.Navisworks.NavisWindow.generateSnapshot C# (CSharp) Method

generateSnapshot() public method

public generateSnapshot ( string folderIssue ) : void
folderIssue string
return void
        public void generateSnapshot(string folderIssue)
        {
            try
            {
                string snapshot = Path.Combine(folderIssue, "snapshot.png");

                // get the state of COM
                ComApi.InwOpState10 oState = ComBridge.State;
                // get the IO plugin for image
                ComApi.InwOaPropertyVec options = oState.GetIOPluginOptions("lcodpimage");

                //export the viewpoint to the image
                oState.DriveIOPlugin("lcodpimage", snapshot, options);
                System.Drawing.Bitmap oBitmap = new System.Drawing.Bitmap(snapshot);
                System.IO.MemoryStream ImageStream = new System.IO.MemoryStream();
                oBitmap.Save(ImageStream, System.Drawing.Imaging.ImageFormat.Jpeg);
                oBitmap.Dispose();
                //IM.postAttach(issueKey, File.ReadAllBytes(snapshot), IM.ConvertToBytes(v), g);
                //   postAttach2(issueKey, ConvertToBytes(v), "viewpoint.bcfv");
            }
            catch (System.Exception ex1)
            {
                MessageBox.Show("exception: " + ex1);
            }
        }
        private VisualizationInfo generateViewpoint(Viewpoint oVP, int elemCheck)