I'm trying to create an executable application using Visual Basic that reads a database to open drawings and create a DWF file for each. The problem I'm having is that after the first drawing is opened, printed, and closed, the second fails to print because, it's my belief, the first drawing is still printing in the background. Here's the code I'm using....
objAutoCADDocs.Open(filelocation)
objAutoCADDoc = objAutoCADApp.ActiveDocument
objAutoCADDoc.PaperSpace.Layout.PlotType = AcPlotType.acExtents
objAutoCADDoc.PaperSpace.Layout.StandardScale = AcPlotScale.acScaleToFit
objAutoCADDoc.PaperSpace.Layout.CenterPlot = True
objAutoCADDoc.PaperSpace.Layout.ConfigName = "DWF6 ePlot.pc3"
objAutoCADDoc.Plot.PlotToFile(plotname)
objAutoCADDoc.Close()
objAutoCADDocs.Open(filelocation)
objAutoCADDoc = objAutoCADApp.ActiveDocument
objAutoCADDoc.PaperSpace.Layout.PlotType = AcPlotType.acExtents
objAutoCADDoc.PaperSpace.Layout.StandardScale = AcPlotScale.acScaleToFit
objAutoCADDoc.PaperSpace.Layout.CenterPlot = True
objAutoCADDoc.PaperSpace.Layout.ConfigName = "DWF6 ePlot.pc3"
objAutoCADDoc.Plot.PlotToFile(plotname)
objAutoCADDoc.Close()
Where the code fails is at the second instance of PlotToFile. Like I mentioned above, I'm thinking that the first drawing is still printing in the background. I've tried using a do while loop, checking IsQuiescent, but this doesn't work.
Any help would be appreciated.