TheSwamp

Code Red => .NET => Topic started by: JasonSelf on March 15, 2012, 11:14:30 AM

Title: CloseAndDiscard Hanging
Post by: JasonSelf on March 15, 2012, 11:14:30 AM
I have the following code the cycles through drawings as part of a batch print application I have developed:
Code: [Select]
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