Close Solidworks without saving through external macro

Hi,

     Need to write one code, which is supposed to work externally in case if the solidworks is frozen with many files open, as run it should close solidworks without saving. Presently i am using VBA. So, how should i start this macro.

SolidworksApi macros
Answers 1
AT
AT 2016-02-24 Best Answer

You can kill the SolidWorks process

In VBA:

<p>Sub main()</p><p></p><p>Shell "TASKKILL /F /IM SLDWORKS.exe", vbHide</p><p></p><p>End Sub</p>

You might need to create an external application in VB.NET.

<p>Module Module1</p><p></p><p>    Sub Main()</p><p>        System.Diagnostics.Process.GetProcessesByName("SLDWORKS").First().Kill()</p><p>    End Sub</p><p></p><p>End Module</p>