I cannot get the info returned by the plot preview window. The following is the code I am using, most of it obtained from this discussion group. No matter what icon I pick to exit the window endPlotInfo is always set to normal. Can anyone advise what I'm missing?
Thanks
Jim
' 0 = no print, next or previous icon
' 1 = print icon
' 2 = next sheet
' 3 = next sheet and print icon
' 4 = previous sheet
' 5 = previous sheet and print icon
' 6 = next, previous sheet
' 7 = next, previous sheet and print icon
Using plEng As Autodesk.AutoCAD.PlottingServices.PlotEngine = _
Autodesk.AutoCAD.PlottingServices.PlotFactory.CreatePreviewEngine(1)
With plEng
.BeginPlot(prDiag, Nothing)
.BeginDocument(plInfo, fiDwgUNC.Name, Nothing, cop, False, Nothing)
.BeginPage(paInfo, plInfo, True, Nothing)
.BeginGenerateGraphics(Nothing)
.EndGenerateGraphics(Nothing)
.EndPage(Nothing)
prDiag.PlotProgressPos = 100
.EndDocument(Nothing)
.EndPlot(Nothing)
' the following is not returning the correct info, I must be
' missing something. Always returns Normal.
Dim endPlotInfo As Autodesk.AutoCAD.PlottingServices.PreviewEndPlotInfo = New Autodesk.AutoCAD.PlottingServices.PreviewEndPlotInfo
Debug.Print(endPlotInfo.Status.ToString)
prDiag.IsVisible = False
End With
End Using