
This document explains the basic procedure for exporting computer-aided design (CAD) assemblies from the Pro/ENGINEER CAD platform into a form you can use with SimMechanics and Simulink®.
Computer-aided design is an integral part of engineering design in many industries. CAD tools allow engineers to model their products in 3-D space. Although this approach is excellent for geometric modeling, incorporating controllers into this environment is difficult. Simulink with SimMechanics uses a block-diagram schematic approach for modeling control systems around mechanical devices. The Pro/ENGINEER-to-SimMechanics translator bridges the gap between geometric modeling and block diagram modeling and combines the power of Simulink and SimMechanics with CAD.
For details about installing and registering the Pro/ENGINEER-to-SimMechanics translator, see the README
file that accompanies it at www.mathworks.com/products/simmechanics.
Define the translator installation directory as $INSTALL.
After you have installed the translator, you must register it with
Pro/ENGINEER before you can use it. While installing the translator, the installer creates a Pro/TOOLKIT registry
file called proe2sm.dat, a small text file
written to the $INSTALL directory that tells Pro/ENGINEER to treat the files constituting
the translator as a Pro/TOOLKIT application.
There are two ways to register the translator with Pro/ENGINEER:
proe2sm.dat
file to your existing Pro/TOOLKIT registry file.Consult the Pro/TOOLKIT User's Guide that accompanies your Pro/ENGINEER installation for further details.
After Pro/ENGINEER finds the translator, SimMechanics appears in the Pro/ENGINEER menu bar.
In Pro/ENGINEER, an unconstrained part has six degrees of freedom (DoFs). You reduce these DoFs by inserting constraints between bodies. Groups of constraints, called connections, define particular types of motion.
In SimMechanics, a body has no DoFs until you connect joints to it. Each joint is a combination of these joint primitives:
The translator maps the Pro/ENGINEER constraints between parts to SimMechanics joint primitives between bodies. In general, the mapping of constraints to joints is not one-to-one. When you generate a SimMechanics model from a CAD assembly, the primitives are combined into the appropriate Joints.
The Pro/ENGINEER constraints supported for this translator are:
The Pro/ENGINEER connections supported for this translator are:
The Pro/ENGINEER constraint entities supported for this translator are:
| Entity | Description |
|---|---|
| Circle/Arc | Circular edge/arc sketch segment |
| Cone | Conical face |
| Cylinder | Cylindrical face |
| Ellipse | Elliptical edge/arc sketch segment |
| Line | Linear edge/sketch segment/reference axis |
| Plane | Reference plane or planar face |
| Point | Vertex/sketch point/reference point |
The SimMechanics primitives and primitive combinations supported for this translator are:
| Primitive Combination | Description |
|---|---|
| P | Prismatic |
| PP | Planar: P and P are perpendicular |
| PPP | |
| PPPR | |
| S | |
| R-S | Revolute-spherical massless connector |
| R | |
| PR | Cylindrical: P and R are parallel |
| PPR | In-plane: R is perpendicular to PP |
| PPPS | Six-DoF |
| R-R | Revolute-revolute massless connector |
| S-S | Spherical-spherical massless connector |
The Pro/ENGINEER-to-SimMechanics translator uses certain settings that can be accessed from the SimMechanics menu in your Pro/ENGINEER menu bar, by selecting Settings. Save and close the SimMechanics Settings dialog by clicking OK. Close the SimMechanics dialog without saving your settings by clicking Cancel.
The SimMechanics Settings dialog contains three active fields that allow you to specify linear and angular tolerances as well as relative roundoff.

When the translator creates joints from Pro/ENGINEER constraints, it checks for vector alignments and spacing. Instead of comparing these alignments and spacings with zero, it compares them with the Linear tolerance and Angular tolerance that you specify in the dialog. The units are meters (m) and radians (rad), respectively. The Relative tolerance specifies the smallest significant relative numerical difference.
After you enter the settings you want, save them by clicking OK in the SimMechanics Settings dialog. Then export the currently open assembly as Physical Modeling XML.

![]()
If no CAD translation errors occur, another message appears, indicating that the translation is complete and the name and location of the XML file.
The exported XML file can be given to another user
able to import it into SimMechanics. Its default name is <filename>.xml,
where <filename> is the name
of the original CAD assembly.
CAD assemblies in Pro/ENGINEER can have subassemblies without underconstrained components. The corresponding subsystems in SimMechanics, with each subassembly part translated individually, would each have all its bodies welded to its subsystem ground. Such a translation would result in an unnecessarily complex SimMechanics model and reduced simulation performance. The subassembly components could not move relative to one another in any case.
The translator automatically detects each such subassembly without underconstrained components and replaces it with a single equivalent rigid body in the translated model.
If CAD translation errors do occur, an error dialog appears. The specific CAD constraint errors are written to a separate error log file. The message window confirms that the XML file is still exported, and models that you generate from this file are valid. But these models do not represent the CAD assembly you started with. The error dialog also indicates the name and location of the exported XML file and the error log file.
See these sections for supported constraints and joints and for model generation instructions.
In
MATLAB, enter the following at the command line to create a SimMechanics model
from the exported Physical Modeling XML file. The .xml
extension is optional.
>> import_physmod('<filename>.xml')
See the SimMechanics CAD Translator Guide (PDF) for more information about generating SimMechanics models from Physical Modeling XML files.
There are specific requirements and best practices that you should follow to create an optimal and functioning SimMechanics model from your CAD assembly. Consult the SimMechanics CAD Translator Guide (PDF) that accompanies the CAD-to-SimMechanics translator.
CAD assembly example files are located, relative to your Pro/ENGINEER installation, in examples.
© 2006-2007 The MathWorks, Inc. - Patents - Trademarks