SolidWorks 2010 x64 SP 5.0, I created a VSTA (VB.NET) macro that uses all 3 of these methods to either create a new drawing file, or open an existing drawing file. The macro will crash SW every time if I haven't previously opened a drawing in the session of SW that I am trying to run the macro in. Does anyone have a workaround for this? It is a pain to have to remember to open a dummy drawing and close it again in order to make the macro run. Once a drawing file has been loaded in the session of SW, then the macro runs just fine. I was told by my VAR that this is a bug in 2010 and that there is no fix for it. I wanted to see what the community had to say about it.
SolidworksApi macros