If you have not yet installed and enabled the Simscape™ Multibody™ Link plug-in on your device, before continuing see Install the Simscape Multibody Link Plug-In.
You can access the export menu from the CAD application menu bar whenever a CAD assembly model is open. The location of the menu can vary with the CAD software version but it is generally under Add-Ins for Autodesk Inventor® software and under Tools for PTC® Creo™ and SolidWorks® software.
Your Simscape Multibody Link installation comes with a number of CAD assembly models that you can use as export examples. You can find the models in the folders:
matlabroot — MATLAB® root
folder, for example,
C:\Programs\MATLAB\. Use the
at the MATLAB command prompt to determine your MATLAB root
cadPlatform is an identifier for
your CAD application—
inventor for Autodesk Inventor,
proe for PTC Creo,
sw for SolidWorks.
modelFolder is the model name or
robot for a robotic arm model
stewart for a Stewart platform model (available
only for SolidWorks and PTC Creo applications). Ignore
the remaining folders.
For example, if your MATLAB root folder is
your CAD application is SolidWorks, and the model that you'd
like to open is
robot, then you can open the mode
from the folder:
Open the assembly model to export. Note that part models are not supported and that the Simscape Multibody Link export menu is not accessible if an assembly model is not open.
From the CAD export menu, select the option to export to the model. Select Simscape Multibody First Generation (1G) only if you intend to use the older first-generation blocks to recreate the model (not recommended).
Specify the XML multibody description file name and folder. The Simscape Multibody Link plug-in generates the XML file and the part geometry files needed to render the model once imported.
with the name of the XML multibody description file as an argument
to import the CAD assembly into the Simscape Multibody modeling
environment. The function parses the file and uses the data contained
therein to generate a Simscape Multibody block diagram and an
accompanying MATLAB data file. See Import a CAD Assembly Model (Simscape Multibody).