Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Interaction between MATLAB and SolidWorks.

Asked by MAX3D on 24 Aug 2012

Hi, support

I work in technical support of SolidWorks and one of my customers that have the need to export files in MATLAB to analyze. I wonder if the program accepts files of my program, as extensions .sldprt or .sldasm, if not, which he accepts CAD files.

Best regards, Cássio Dahmer

2 Comments

Walter Roberson on 24 Aug 2012

I have now gone through past Questions about connecting Solidworks with MATLAB, and have given them the tag "solidworks".

Vik Sagar on 8 Dec 2012

Hi Cassio, We wanted something to talk back and forth from SolidWorks to MATLAB in real time rather than one time using XML files. We wanted the changes in MATLAB to be immediately reflected in SolidWorks. We found this tool called CADLab which helped reduce the cycles between SolidWorks and MATLAB. It is available at http://www.finitebusiness.net/solutions.php?page=solutions&pid=1

Hope that helps out.

-Vivek

MAX3D

Tags

Products

2 Answers

Answer by Walter Roberson on 24 Aug 2012

When I look through past questions, and look at the documentation, it appears to me that there is no provided support for sldprt or sldasm files. What I do see is that SimMechanics can handle STL files and possibly some other types.

Please see http://www.mathworks.co.uk/matlabcentral/answers/22733-modelling-the-trajectory-of-a-solidworks-basketball-part-into-a-basketball-net-is-it-possible for a couple of references.

A past posting of relevance to importing from Solidworks http://www.mathworks.co.uk/matlabcentral/answers/40835-cad-to-simmechanics-second-generation

0 Comments

Walter Roberson
Answer by Tony on 25 Aug 2012
Edited by Tony on 25 Aug 2012

Hi Cassio,

I am not sure about MATLAB itself, but SimMechanics provides a free utility, called SimMechanics Link, which supports CAD export directly from SolidWorks. After you complete the linking (or registration) steps, the utility functions as an Add-In tool of SolidWorks.

During export, the utility generates one XML file with all necessary assembly and part parameters, and a set of STL files describing the 3-D surface geometry for each CAD part.

Once you've exported the assembly from SolidWorks, you can import the XML and STL files into SimMechanics using a single command. SimMechanics uses the files to automatically generate a model that is equivalent to the original CAD assembly (with some exceptions for assemblies containing unsupported mates).

You can then analyze (and modify) the imported assembly using SimMechanics, Simscape and Simulink blocks as well as MATLAB functions.

To download SimMechanics Link, click here. For information on how to install and register SimMechanics Link, click here.

Hope that helps!

- Tony

0 Comments

Tony

Contact us