Esempio n. 1
0
        private string generateSnapshot()
        {
            MSApp.CadInputQueue.SendKeyin("null");
            MSApp.CadInputQueue.SendKeyin("MDL KEYIN BENTLEY.VIEWATTRIBUTESDIALOG,VAD VIEWATTRIBUTESDIALOG SETATTRIBUTE 0 Camera False");
            string tempSnapshotPath           = Path.GetTempFileName();
            CaptureScreenModalHandler handler = new CaptureScreenModalHandler(tempSnapshotPath, getActiveViewNumber());

            MSApp.AddModalDialogEventsHandler(handler);
            MSApp.CadInputQueue.SendKeyin("SAVE IMAGE ");
            MSApp.RemoveModalDialogEventsHandler(handler);
            MSApp.CommandState.StartDefaultCommand();
            return(tempSnapshotPath);
        }