View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
CAD to MATLAB to Simscape Multibody

3.8 | 5 ratings Rate this file 28 Downloads (last 30 days) File Size: 15.8 MB File ID: #47070 Version:
image thumbnail

CAD to MATLAB to Simscape Multibody


Steve Miller (view profile)


30 Jun 2014 (Updated )

Export a CAD assembly to a MATLAB data structure and import into a Simscape Multibody model.

| Watch this File

File Information

This file contains data2smixml(), which is MATLAB code that converts a MATLAB data structure into a Simscape Multibody model. A macro written in Visual Basic extracts CAD assembly information from a SolidWorks assembly into a specific MATLAB data structure. That MATLAB data structure is converted to a Simscape Multibody XML file using the MATLAB function data2smixml(). The resulting Simscape Multibody XML file can be imported into a Simscape Multibody model using smimport().
A Visual Basic macro is provided to show an algorithm for extracting data from a CAD assembly. Assemblies in SolidWorks, Wildfire, Creo (formerly Pro/Engineer), and Inventor can be exported to a SimMechanics XML file using Simscape Multibody Link. If you are using another CAD system, this example can help you write a macro for your CAD system.
Please read the README.txt file to get started.
Watch this video to see how Simscape Multibody Link works

To find other Simscape examples, search for posts with the keyword "physical modeling"

To learn more about MathWorks Simscape Products, go to:

Required Products Simscape Multibody
MATLAB release MATLAB 9.0 (R2016a)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
21 Feb 2017 Romain PINQUIÉ

Hi Steve,

Thanks for sharing your great work. I was wondering if we could extend your approach to Catia assemblies (CATProduct) as there is no added value to reproduce the model in Simscape multibody.

Thanks for giving me some clues.



15 Sep 2016 Johann Wiens

15 Sep 2016 Johann Wiens

08 Jun 2016 Dale

Dale (view profile)

19 Jun 2015 Sergey

Sergey (view profile)

07 Mar 2016 1.1

Updated for R2016a (SimMechanics renamed Simscape Multibody).

01 Sep 2016

Updated license

Contact us