Problem:

If the log file contains the following message:

Log: Unable to cast a COM object ...

 

Solution:

Repair or reinstall SOLIDWORKS.