Main Content

Export a CAD Assembly Model

Installing and Enabling the Plug-In

If you have not yet installed and enabled theSimscape™ Multibody™ Linkplug-in on your device, before continuing seeInstall 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 underAdd-Insfor Autodesk Inventor®software and underToolsforPTC®Creo™and SolidWorks®software.

Opening a CAD Model Example

YourSimscape Multibody Linkinstallation comes with a number of CAD assembly models that you can use as export examples. You can find the models in the folders:

matlabroot\toolbox\physmod\smlink\smlinkdemos\cadPlatform\modelFolder
Replace the following as described:

  • matlabroot— MATLAB®root folder, for example,C:\Programs\MATLAB\. Use thematlabrootcommand at the MATLAB command prompt to determine your MATLAB root folder.

  • cadPlatformis an identifier for your CAD application—inventorfor Autodesk Inventor,proeforPTC Creo, andswfor SolidWorks.

  • modelFolderis the model name or abbreviation—robotfor a robotic arm model andstewartfor a Stewart platform model (available only for SolidWorks and PTC Creo applications). Ignore the remaining folders.

For example, if your MATLAB root folder isC:\Programs\MATLAB, your CAD application is SolidWorks, and the model that you’d like to open isrobot, then you can open the mode from the folder:

C:\Programs\MATLAB\toolbox\physmod\smlink\smlinkdemos\sw\robot

Export Model

  1. Open the assembly model to export. Note that part models are not supported and that theSimscape Multibody Linkexport menu is not accessible if an assembly model is not open.

  2. From theCAD export menu, select the option to export the model.

  3. Specify the XML multibody description file name and folder. TheSimscape Multibody Linkplug-in generates the XML file and the part geometry files needed to render the model once imported.

After Export

Use thesmimportfunction with the name of the XML multibody description file as an argument to import the CAD assembly into theSimscape Multibodymodeling environment. The function parses the file and uses the data contained therein to generate aSimscape Multibodyblock diagram and an accompanying MATLAB data file. SeeImport a CAD Assembly Model.

Warning

This content refers toSimscape Multibody LinkFirst Generation software. First-generation features are slated to be deprecated and should be avoided. To prevent compatibility issues in future releases, theSimscape Multibody Linkplug-in no longer supports the translation of CAD models intoSimscape Multibody LinkFirst Generation models.