.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exception EMaxReaders

3 REPLIES 3
Reply
Message 1 of 4
MexicanCustard
315 Views, 3 Replies

Exception EMaxReaders

I've got a plug in that works through a large selection of MEP MultiViewParts, a few thousand.  Data is taken from each part and added to a DataTable which I use to create reports (Bill of Materials and others).  Everything works great until you run the program multiple times. It varies but around the fourth or fifth time I get an EMaxReaders exception.  I can Audit the drawing and everything starts working again.  I've checked to make sure I'm not leaving anything open and in this case everything is opened using a transaction so I'm assuming AutoCAD is closing everything.  Any ideas?

3 REPLIES 3
Message 2 of 4

Sounds like the transaction isn't being disposed...

 

example

 

Try

t = db.TransactionManager.StartTransaction

 

do something

 

save

 

t.Dispose()

 

Message 3 of 4

All my transactions are contained within using statements, so they are automatically disposed.

Message 4 of 4

Something is not allowing the transaction to dispose, if the appilication is consitently craching as 4-5 drawing the cache is max'n out. Kean has a posting the discusses reclaiming memory, you may want look into this.

 

Reclaiming memory from erased AutoCAD entities using .NET

 

or  try 

 

open the file

 

do something

 

close the trasaction(commit)

 

save the file

 

dispose

 

On another note: I have experience these types of errors in the past and have moved away from "using"  as when your applications run into unstable files your applicationcan handles the error without hang'n AutoCAD(most of the time).

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost