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

Autocad Transaction and multi layer application

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
507 Views, 1 Reply

Autocad Transaction and multi layer application

I am working on a multi-layered application that is Data acess, Bussiness and UI layer. The application works with several providers like Autocad and Sketchup. All the Autocad/Sketchup specific APIs are dealt with in Data Acess layer. The thing is, in a modaless application, to hide the Atuocad specific APIs like the transaction calls(oppening/clossing/commiting) and to keep it on the Data Access layer the cost is high as on each call a new transaction has to be opened whereas a possible one single transaction in the UI layer can handle the fetching/updating more quickly. 

 

So my question is that is there a way to keep the transaction activities on DAL or to just open it once on loading the application and disposing it on unloading/closing the application/form.

 

Thanks,

Ali

Tags (2)
1 REPLY 1
Message 2 of 2
augusto.goncalves
in reply to: Anonymous

If you leave the transaction open, AutoCAD will remain "on hold" and will crash if any other command tries to interact with it.

AutoCAD expects that, for each command, a top (and child) transaction will open, close and dispose. If not, it may behave unexpected and, most likely, crash.

As you have an external type of call (not sure how you handle multi-thread and concurrence), you may try StartOpenCloseTransaction and Commit transactions (Abort takes longer).
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network

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

Post to forums  

Forma Design Contest


AutoCAD Beta