Author Topic: CloseAndDiscard Hanging  (Read 1316 times)

0 Members and 1 Guest are viewing this topic.

JasonSelf

  • Guest
CloseAndDiscard Hanging
« 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