Export a CAD Assembly Model
Installing and Enabling the Plug-In
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 Plugin.
Accessing the CAD Export Menu
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.
Opening a CAD Model Example
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
matlabrootcommand at the MATLAB command prompt to determine your MATLAB root folder.
cadPlatform is an identifier for your CAD application—
inventorfor Autodesk Inventor,
proefor PTC Creo, and
modelFolder is the model name or abbreviation—
robotfor a robotic arm model and
stewartfor a Stewart platform model (available only for SolidWorks and PTC Creo applications). Ignore the remaining folders.
For example, if your MATLAB root folder is
C:\Programs\MATLAB, your CAD
application is SolidWorks, and the model that you’d like to open is
then you can open the mode from the
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 the model.
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.
smimport function with the name of the
XML multibody description file as an argument to import the CAD assembly into the
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.
This content refers to Simscape Multibody Link First Generation software. First-generation features are slated to be deprecated and should be avoided. To prevent compatibility issues in future releases, the Simscape Multibody Link plug-in no longer supports the translation of CAD models into Simscape Multibody Link First Generation models.