I have the following code the cycles through drawings as part of a batch print application I have developed:
If (File.Exists(CurDwg)) Then
Dim DocMgr As DocumentCollection
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager
DocMgr.Open(CurDwg, True)
PlotService.PlotNow(Datestring)
DocMgr.MdiActiveDocument.CloseAndDiscard()
Else
MessageBox.Show("Drawing Does Not Exist")
End If
I have noticed that on some very large drawings, well over a gig in memory when loaded, the CloseAndDiscard Statement seems to take forever to execute. It works fine when manually opened, printed and closed. Any thoughts on how I can resolve this?
Thanks,
Jason Self