Simscape™
Multibody™ Link is a plug-in that you install on
your CAD application to export your CAD assembly models. The plug-in
generates the files that you need to import the model into the Simscape
Multibody environment
(using the smimport
function).
You can install the plug-in on three CAD applications:
SolidWorks®
Autodesk Inventor®
PTC® Creo™
You can export an assembly model from Onshape® CAD software
using the smexportonshape
function.
This function generates the same files as the Simscape
Multibody Link plug-in—one
an XML multibody description file, the rest a set of body geometry
files.
If you use a different CAD application, you can create a custom application based on the published Simscape Multibody XML schema. This approach requires some knowledge of XML. See the schema web page for an example.
If you can export a multibody model in URDF format, then you
can also import that model using the smimport
function.
This approach may suit you if your CAD application is not among those
supported and you have little experience with XML schemas.
You must have a valid MATLAB® license and one of the supported CAD applications:
Autodesk Inventor software
PTC Creo software
SolidWorks software
Your MATLAB and CAD installations must have the same system architecture—e.g., Windows 64-bit.
Go to the Simscape Multibody Link download page.
Follow the prompts on the download page.
Save the zip archive and MATLAB file in a convenient folder.
Select the file versions matching your MATLAB release number and system architecture—e.g., release R2015b and Win64 architecture. Do not extract the zip archive.
Run MATLAB as administrator.
Add the saved installation files to the MATLAB path.
You can do this by entering addpath('foldername')
at
the MATLAB command prompt. Replace foldername
with
the name of the folder in which you saved the installation files—e.g., C:\Temp
.
At the MATLAB command prompt, enter install_addon('zipname')
.
Replace zipname
with the name of the zip
archive—e.g., smlink.r2015b.win64.zip
.
Each time you export a CAD assembly model, the Simscape Multibody Link plug-in attempts to connect to MATLAB. For the connection to occur, you must register MATLAB as an automation server. You can do this in two ways:
In a MATLAB session running in administrator
mode — At the command prompt, enter regmatlabserver
.
In an MS-DOS window running in administrator mode
— At the command prompt, enter matlab -regserver
.
Before you can export an assembly, you must enable the Simscape Multibody Link plug-in on your CAD application. To do this, see: