Here is the next issue I'm dealing with on my plotting program.
I have a "Preview" button on my modal form.
Here is part of the code that executes when the button is clicked:
PlotProgressDialog prog = new PlotProgressDialog(true, 1, true);
this.Hide();
PlotEngine pEng = PlotFactory.CreatePreviewEngine(0);
prog.OnBeginPlot();
prog.IsVisible = true;
pEng.BeginPlot(prog, null);
pEng.BeginDocument(pInf, currDwgName, null, 1, false, string.Empty);
pEng.BeginPage(pPInfo, pInf, true, null);
pEng.BeginGenerateGraphics(null);
pEng.EndGenerateGraphics(null);
pEng.EndPage(null);
pEng.EndDocument(null);
pEng.EndPlot(null);
prog.IsVisible = false;
prog.OnEndPlot();
prog.Destroy();
pEng.Destroy();
I've left out some of the code to help focus on what I think is the problem.
Everything works fine up until the line: "pEng.BeginGenerateGraphics(null);"
The program never comes out of that method. The preview shows in the AutoCAD window and everything looks as it should but that window is frozen. AutoCAD never gets control.
Any ideas?