You are on page 1of 6

Exporting and ReExporting a CAD Assembly

On this page
About CAD Assembly Export
Configuring the Exporter Controls in Supported CAD Platforms
Creating the XML File
ReExporting an Assembly After Changes
Exporting a Robot Arm Assembly for the First Time
ReExporting a Robot Arm Assembly After Changes
About CAD Assembly Export
This section explains at a high level how to export CAD assemblies from CAD platforms
supported by the SimMechanics Link utility.
Requirements for Export with a Supported CAD Platform
The SimMechanics Link Reference presents platformspecific information on:
Linking a supported CAD platform with the SimMechanics Link utility
Finding, changing, and applying export settings
Exporting assemblies in the Physical Modeling XML format through the CAD
platform interface
Requirements for Export with an Unsupported CAD Platform
If the SimMechanics Link utility does not support your CAD platform, you can still
export assemblies to Physical Modeling XML. But you must first construct your own
custom exporter through the SimMechanics Link application program interface (API).
See the Custom Linking to CAD and Other External Applications chapter.
Back to Top
Configuring the Exporter Controls in Supported CAD Platforms
Once it is linked to the SimMechanics Link utility, each CAD platforms interface has a
SimMechanics Link menu that allows you to access the export settings pane or dialog
box. Before you export an assembly, you can check, change, and apply the export
settings.
Opening the Settings Pane or Dialog Box
Open your CAD assembly. 1.
From the CAD platforms SimMechanics Link menu, open the settings interface. 2.
At any time, you can:
Apply your settings.
Cancel your settings. You lose whatever new settings you have entered.
Configuring the Export Tolerances
In the settings interface, you can configure one or more of the export tolerances.
Geometric and numerical differences smaller than the tolerances are treated as zero.
Linear tolerance specifies the smallest significant difference in length.
Angular tolerance specifies the smallest significant difference in angle.
Relative roundoff specifies the smallest significant numerical difference.
Configuring Reference Coordinate Systems for Export
In the export coordinate systems interface, you can require the export of all, some, or
none of the reference coordinate systems in your assembly. You control selective
export by adding a distinctive prefix to the names of assembly coordinate systems that
you want to export.
You can export all the reference coordinate systems by choosing export and
specifying no prefix.
You can export some of the reference coordinate system by choosing export and
specifying a prefix. Reference coordinate systems labeled by names with that
prefix are exported.
You can also choose not to export any reference coordinate systems.
For example, if your assembly has 11 reference coordinate systems (five with names
beginning with , three with names beginning with , and three with names beginning
with ), you can choose to export:
All 11 coordinate systems by specifying no prefix.
The five coordinate systems with names prefixed by by specifying the prefix
.
The three coordinate systems with names prefixed by by specifying the prefix
.
The three coordinate systems with names prefixed by by specifying the prefix
.
Note Your CAD platform and SimMechanics Link interface might not support
inserting and exporting reference coordinate systems. For details, consult the
SimMechanics Link Reference.
Applying the Export Settings
Apply your export settings by clicking the OK button in the settings pane or dialog box.
The settings interface closes.
Back to Top
Creating the XML File
To complete export of the assembly to a Physical Modeling XML file:
If you changed the assembly or any subassemblies, you must rebuild the
assembly and resave it in its native format before exporting it to XML.
1.
Export the assembly through the CAD platforms SimMechanics Link interface.
The assembly is saved in a new form as an XML file. The exporter displays a
dialog box when it is finished.
2.
The default XML file name and folder are the same as those of the CAD assembly file.
The default XML file name and folder are the same as those of the CAD assembly file.
With the export interface, you can change the XML file name and folder if you want.
Automatic Export of Stereolithographic Files
In addition to the XML file, the exporter creates a stereolithographic (STL) file for each
part in the assembly that represents the parts body surface geometry.
The STL files automatically receive names based on their respective part names
in the assembly.
The STL files are saved in the folder where the XML file is saved.
Back to Top
ReExporting an Assembly After Changes
The results of a CAD export are changed if you:
Change the assembly or any of its subassemblies or parts
Change the export settings. See Configuring the Exporter Controls in Supported
CAD Platforms preceding.
Reexporting an assembly after such changes is, by default, identical to the initial
export steps. See Creating the XML File preceding. With no changes to the XML file
save procedure, your reexport overwrites the existing XML and STL files with the same
names.
Tip For later use and comparison, you might want to preserve the older XML
and STL files.
You can use the old folder and give the reexported XML file a new
name. The exporter still overwrites the old STL files.
You can use a new folder and avoid overwriting any old files.
Consequences of ReExporting Assemblies for Generated Models
While the reexport procedure is the same as, or only slightly different from, the initial
export, the resulting new Physical Modeling XML file represents a revised CAD
assembly, not a new assembly. To import this XML file with the SimMechanics importer
requires choosing how to implement the revisions:
Create a new SimMechanics model
Update an existing generated SimMechanics model
You can make more detailed adjustments to the second choice as well, using the
persistent properties that the XML file retains when you revise and reexport an existing
assembly. See Retranslating from Assembly to Existing Generated Model following.
The SimMechanics Visualization and Import Guide describes in fuller detail the updating
of generated SimMechanics models from revised assemblies and reexported XML files.
Back to Top
Exporting a Robot Arm Assembly for the First Time
In this example, you export a CAD assembly for the first time into Physical Modeling
XML.
From the SimMechanics Link demos folder, open the robot arm assembly file,
, using a supported CAD platform linked to the
SimMechanics Link utility.
The demo CAD files are under
, in the
subfolder appropriate to your supported CAD platform. The file extensions of
these files are specific to each CAD platform.
1.
If you want, open the settings pane or dialog box from the SimMechanics Link
menu in your CAD interface. (See Configuring the Exporter Controls in Supported
CAD Platforms preceding.)
Make any adjustments you want to the export settings and apply the settings.
The settings interface closes.
2.
From the CAD platforms SimMechanics Link menu, open the export interface. 3.
Change to a different folder to export the XML file. Leave the file name as the
default, .
4.
Start the export. The exporter begins converting and saving the XML file. When
the exporter is finished, it displays a message or dialog box similar to this
example from SolidWorks:
5.
The XML file is saved to the folder you chose. The exporter also automatically writes the
stereolithographic (STL) body surface geometry files to the folder you choose.
Exported Robot Arm XML and STL Files Viewed in MATLAB Desktop on Windows
Back to Top
ReExporting a Robot Arm Assembly After Changes
In this example, you reexport the robot arm CAD assembly after making some
changes. You save the new version of the XML file under a new name, but overwrite the
old stereolithographic (STL) files.
These changes can include modifications of the assembly or subassembly parts.
They can also include modifications to the export settings. (See Configuring the
Exporter Controls in Supported CAD Platforms preceding.)
With the assembly open from your CAD platform interface:
Open the export interface from the SimMechanics Link menu. Remain in the
same folder in which you saved the original exported files.
1.
Change the exported file name to . 2.
Start the export. 3.
The new XML file, with the new name, is saved in the same folder as the original export.
The exporter overwrites the old stereolithographic files with new ones, named with the
same names.
ReExported Robot Arm XML and STL Files Viewed in MATLAB Desktop on
Windows
Back to Top

Was this topic helpful?



Yes No

Designing a CAD Assembly for
Export
Retranslating from Assembly to Existing
Generated Model
19842012 The MathWorks, Inc. Terms of Use Patents Trademarks
Acknowledgments