The translation process from an externally defined machine representation to a Simscape™ Multibody™ model is the same whether you use the standard export with a supported external third-party platform or create your own custom exporter. The Simscape Multibody Link exporter translates mechanical system data from an external application, such as a computer-aided design (CAD) platform. You can use this translated data to generate a Simscape Multibody model of your original mechanical system.
You must create and use your own custom exporter when:
You want to export an assembly from a CAD platform that the Simscape Multibody Link utility does not support.
The standard export from a supported CAD platform does not yield the results that you want.
CAD translation includes CAD assembly export and Simscape Multibody model import. Export requires:
A CAD platform or application, including access to its application programming interface (API)
MATLAB® installed and registered as a server
The Simscape Multibody Link utility, which includes its own API
A custom exporter module that you create and that transfers assembly information from the CAD platform API to the Simscape Multibody Link API
Import requires Simscape Multibody software.
You generate Simscape Multibody models from Physical Modeling XML files. You use mechanical import and then visualize the models with geometry files in STEP or STL format. Custom export creates an XML file to represent a CAD assembly and a set of geometry files to represent the surface geometries of the assembly bodies. This part of CAD translation is the same as standard export.
From Physical Modeling XML to Visualizable Simscape Multibody Model
For custom export, you must create a custom exporter module that interacts with the APIs of both the CAD platform and the Simscape Multibody Link utility. From a CAD assembly, this custom exporter module creates a selective, intermediate representation of the machine that persists for one session. The module then finishes by creating the same files as the standard export does:
A Physical Modeling XML file representing selected data required to generate a Simscape Multibody model, which is written from the selective representation
A set of geometry files to represent the surface shapes of the assembly bodies
Custom Export: From CAD Assembly to Physical Modeling XML
Note: The Simscape Multibody Link API is supported on all platforms that MATLAB supports.
To create a custom exporter:
Access the API of your CAD platform and understand how to call it from an external program. See your CAD platform documentation.
Access the Simscape Multibody Link API and understand how to call it from an external program.
Write the custom exporter module in C/C++.
The module might be an executable or a linked library, depending on your CAD platform requirements and API.
For more information, see Custom Translation into Physical Modeling XML Format