Stability of SolidWorks 2009 when programming a stand alone application

Hi,

I am working on a stand-alone application that automates a lot of operations in SolidWorks. I have been doing so for some time.

I have a general question about programming tips in regards to memory handling etc. I ask this because I, from time to time, experience some stability issues with SolidWorks. I get "The server threw an exception" errors, which indicates that SolidWorks is crashing. And normally it does so seconds after I get the error (I use Try Catch statements i my code).

So I am wondering if there is some programming technique/pattern that I should adhere to in order to minimize the risks of these types of crashes?

Best regards

Pål Eilertsen

SolidworksApi macros