Archive

Archive for July, 2010

Restore .NET Framework back to its original state

July 25th, 2010

Background

If you have done a clean re-install of SolidWorks and are still getting strange errors (such as missing dlls, or “unknown file types”), it may well be Microsoft .NET Framework at fault. Most of the time, looking in the Windows Event Viewer will confirm this if there are .NET Framework errors showing up.

The first step is to do a repair of .NET Framework, by going to Add/Remove Programs, right-clicking on .NET Framework (choose 3.5 or 3.1 if present) and going Repair. This should work, however sometimes it doesn’t.

You can also try:
Exploring the SolidWorks DVD and in the prereqs folder run “dotnetfx3.exe” (or dotnetfx3_x64.exe). I tried this however I got strange errors about “mscoree.dll” etc.

Download and usage

If all else fails, you can use a “.NET Framework Cleanup Tool“. It works really well and has worked for me every time. You can download this Executable Tool (in a Zip file) from: http://blogs.msdn.com/b/astebner/archive/2008/08/28/8904493.aspx

  • Just run the exe file and go “Cleanup Now”.
  • It takes around 5 minutes to process and at the end you will be prompted to Restart the Computer. Restart the Computer/
  • After the reboot, look in Add/Remove Programs. If its Windows XP, you will see the original .NET Framework 1.1 listed. Thats perfect.
  • From the prereqs folder of the SolidWorks DVD run “dotnetfx3.exe” or “dotnetfx3_x64.exe”.
  • Once this is installed, you should be able to start SolidWorks. (No need to go reinstalling SolidWorks)
  • Fingers crossed the dll errors or strangeness in SolidWorks will have gone.

Notes:
This worked fine on SolidWorks 2009 and SolidWorks 2010
Search the SolidWorks Knowledge Base for the dll error messages or for errors regarding the feature you are having issues with (such as property tab builder etc.) It will typically tell you if its a .NET issue.
Link to dotnetfx3.exe and dotnetfx3_x64.exe
After running the cleanup tool, rebooting, installing dotnetfx3.exe SolidWorks will work fine.
Installing .NET Framework 3 (the dotnetfx3.exe linked above and on the SW prereqs folder), will install .NET Framework 2.0 and 3.0.
I suggest you run Windows Updates, several times. More than likely a .NET 3.5 will have to be installed. Note also, until you run Windows Updates and install all .NET Frameworks that were in place (in Add/Remove Programs in the very begining), some other installed programs on your computer may give out.
Lastly, use at your own risk!

How-To, Note to Remember , , , ,

Macro Tip – How to quickly stop a SolidWorks macro

July 3rd, 2010

CTRL + Pause/Break

Especially useful for macros which loop through lots of operations.

If you have a looping MsgBox() popup, the above CTRL+break doesn’t seem to work. In this case:

Task Manager -> Processes -> swvbaserver.exe (End Process)
Note: SW may have to be restarted to allow a macro to run afterwards.

Reference

How-To, Macro