Platform: Windows Applies to: LiveLink™ for SOLIDWORKS® Versions:

Problem Description

When I try to synchronize the geometry between COMSOL and SOLIDWORKS, the error message

Failed to connect to SOLIDWORKS. Please make sure SOLIDWORKS is running.

is displayed, and the COMSOL Multiphysics tab in SOLIDWORKS is not available.

Solution

If you have licensed LiveLink for SOLIDWORKS, the COMSOL Installer creates an add-in in SOLIDWORKS called LiveLink for COMSOL. This add-in should appear in the SOLIDWORKS user interface, listed in the Add-Ins dialog box, accessible from the Tools menu.

The connection between COMSOL and SOLIDWORKS can fail if the add-in cannot be loaded by SOLIDWORKS. This could happen for example if the COMSOL installation is moved to a different folder. In the case of such a failure, you can reinstall LiveLink for SOLIDWORKS, or repair the installation as described in knowledgebase 1221.

Manual Repair

It is possible to set up the connection manually as follows:

  1. Close SOLIDWORKS if it is running on your computer.
  2. Click the Start menu symbol in the lower-left corner of your Windows desktop.
  3. Enter cmd in the Start Search field.
  4. cmd.exe appears in the list of programs. Right-click on it and select Run as administrator.
  5. In the command window that appears enter one of the following, depending on your operating system:

Note: For the specified version, all commands need to be entered, and each complete command string must be written on a single row.

COMSOL 6.1 and newer:

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "C:\Program Files\COMSOL\COMSOLXX\Multiphysics\ext\LiveLink\SolidWorks\win64\cslivelinksw.dll" /codebase

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "C:\Program Files\COMSOL\COMSOLXX\Multiphysics\ext\LiveLink\SolidWorks\win64\cscomactivex.dll" /codebase

In the above C:\Program Files\COMSOL\COMSOLXX\Multiphysics is the local path to your COMSOL installation. Use the version number corresponding to your installation, for example C:\Program Files\COMSOL\COMSOL62 for COMSOL Multiphysics 6.2.

COMSOL 5.4 to COMSOL 6.0:

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "C:\Program Files\COMSOL\COMSOLXX\Multiphysics\ext\LiveLink\SolidWorks\win64\cslivelinksw.dll" /codebase

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "C:\Program Files\COMSOL\COMSOLXX\Multiphysics\ext\LiveLink\SolidWorks\win64\cscomactivex.dll" /codebase

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "C:\Program Files\COMSOL\COMSOLXX\Multiphysics\ext\LiveLink\SolidWorks\win64\Comsol.LiveLink.SOLIDWORKS.OneWindow.dll" /codebase

In the above C:\Program Files\COMSOL\COMSOLXX\Multiphysics is the local path to your COMSOL installation. Use the version number corresponding to your installation, for example C:\Program Files\COMSOL\COMSOL60 for COMSOL Multiphysics 6.0.

COMSOL 5.0 to COMSOL 5.3a:

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "C:\Program Files\COMSOL\COMSOLXX\Multiphysics\ext\LiveLink\SolidWorks\win64\cslivelinksw.dll" /codebase

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe "C:\Program Files\COMSOL\COMSOLXX\Multiphysics\ext\LiveLink\SolidWorks\win64\cscomactivex.dll" /codebase

In the above C:\Program Files\COMSOL\COMSOLXX\Multiphysics is the local path to your COMSOL installation. Use the version number corresponding to your installation, for example C:\Program Files\COMSOL\COMSOL53a for COMSOL Multiphysics 5.3a.

Activate the Add-in

To complete the registration you may also have to activate the add-in in SOLIDWORKS:

  1. Open SOLIDWORKS and on the Tools menu select Add-Ins.
  2. In the Add-Ins dialog box that opens, make sure that the LiveLink for COMSOL item is active by selecting the appropriate check boxes.