Data Exchange Interface PDF
Data Exchange Interface PDF
Site Map
Preface
What's New?
User's Tasks
Customizing
Glossary
Index
Customizing
Glossary
Index
Preface
CATIA Version 5 is an open system, capable of interoperating with data in all of the
mostly used data format standards in the CAD/CAM/CAE Industry.
For Importing and Exporting external files there are miscellaneous formats : STEP,
IGES, DXF/DWG, CGM, STL, VRML, and STRIM/STYLER.
These formats are used to transfer geometric data (surfaces and wireframe) between
different CAD-CAM systems in following situations :
concurrent engineering with using several CAD-CAM systems
migration of databases when changing system (example: for new
CATIA customers)
exchanges of geometric data with clients or suppliers
The CATIA - Data Exchange Interfaces User's Guide has been designed to show
you how to Import and Export external files in/from CATIA Version 5.
What's New?
STEP :
Importing a STEP AP203 / AP214 File
=> Offset Surfaces
Exporting CATPart or CATProduct Data to a STEP AP203 / AP214 File
=> Performance of Export and Size of generated Files
IGES :
Import of a 2D IGES File into a CATDrawing
DXF / DWG :
Importing /Exporting a DXF / DWG File
=> DWG File: Dimensions Import Configuration
User's Tasks
Importing a STEP AP203 / AP214 File
Exporting Data to a STEP AP203 / AP214 File
Importing a 3D IGES File into a CATPart
Importing a 2D IGES File into a CATDrawing
Exporting CATPart or CATProduct Data to an IGES File
Importing a DXF/DWG File into a CATDrawing
Inserting a DXF/DWG File into a CATDrawing
Exporting a CATDrawing Document's Data into a DXF or DWG File
Exporting a CGM File
Inserting a CGM File into an Existing CATDrawing
Exporting CATPart Data to an STL File
Exporting 3D Documents to VRML
Opening a Document from STRIM or STYLER
Importing a STEP AP203 / AP214 File
This task shows you how to import to a CATPart or CATProduct document the data contained in a STEP AP203 / AP214 file.
You can automate Data exchanges between CATIA V5 and STEP/IGES/DXF using VBScript macros. The process is explained in the last
part entitled Importing Using VBScript Macros.
4. Consult the report file (name_of_step_file.rpt) and the error file (name_of_step_file.err) which are generated by the import operation. These
files are created in a location referenced by the CATReport variable. On NT the default value of this variable is Profiles\user\Local
Settings\Application Data\Dassault Systemes\CATReport and on UNIX it is $HOME/CATReport.
After the recovery of STEP files, CATIA V5 generates a report file. In this file you can find references about the quality of the transfer.
Here is a conversion summary:
Entity Mapping OK KO NS OUT DEG INV
MANIFOLD_SOLID_BREP 1 0 0 0 0 0
ADVANCED_FACE 2310 0 0 0 0 0
Result 2311 0 0 0 0 0
Legend:
OK = Transferred OUT = Out Of Size
KO = Not Transferred DEG = Degenerated
NS = Unsupported INV = Invalid
"OUT" entities are OUT of model size. Most of the time, these entities are curves and they are out of the V5 model space. These entities are
not created.
"INV" entities are Invalid entities, that is to say their description within the STEP file is invalid (STEP syntax rules are not respected,...). These
entities are not created.
"DEG" entities are degenerated entities. They are solids (MANIFOLD_SOLID_BREP) or Shells (OPEN_SHELL), or Curves (LINE,
CIRCLE,...). Degenerated solids are incomplete solids (at least one Face misses)
Implemented Not yet implemented N/A: Not applicable according to the standard
Curve
line N/A
circle N/A
ellipse N/A
hyperbola N/A
parabola N/A
polyline N/A
b_spline_curve (+ rational)
N/A
b_spline_curve_with_knots
bezier_curve N/A
boundary_curve
N/A N/A N/A N/A N/A N/A
outer_boundary_curve
Surface
plane N/A N/A N/A
b_spline_surface
N/A N/A N/A N/A
b_spline_surface_with_knots
Topology
vertex_point N/A N/A N/A
face_bound
N/A N/A N/A N/A
face_outer_bound
Operating mode:
create a RunTime window (window in which all runtime variables a set)
type the command: cnext –macro MyMacro.CATScript
where MyMacro.CATScript is the VBScript macro you want to execute
Limitations:
The input files must be writable (not read only). Otherwise CATIA will display an information box
and wait for an acknowledge.
The output file must not exist in the output directory otherwise CATIA will ask for a confirmation
to overwrite the file and wait for an acknowledge.
Recommended practices:
You can transfer several files within the same macro, but it is recommended to do only one
transfer per macro.
Example:
Language="VBSCRIPT"
Sub CATMain()
Dim Document0 As Document
' Reading a STEP file
Set Document0 = CATIA.Documents.Open ( "E:\tmp\Box.stp" )
' Saving the corresponding CATPart
CATIA.ActiveDocument.SaveAs "E:\tmp\Box"
CATIA.Quit
End Sub
Exporting CATPart or CATProduct Data to a STEP AP203 /
AP214 File
This task shows you how to save in STEP AP203 / AP214 formats the data contained in a CATPart or CATProduct document.
STEP AP203 and STEP AP214 formats are used for the data exchange between the Assembly workbench and other CADCAM
software products. Saving your assembly in STEP AP203 / AP214 format comes down to gathering assembly data into one file.
The assembly structure and the geometry (in compliance with the STEP format) are saved.
You can export:
CATProduct documents (resulting in STEP AP203 / AP214 files in compliance with Part 44)
the bodies (volumes, shells and faces) of CATPart documents (resulting in STEP AP203 / AP214 files in compliance with
Part 42)
The export of Shells occurs with no limitation and all the structure information can be recovered.
Multiple Instances of a Part in an Assembly is possible: a link with the same reference is established in order to limit the
number of instances.
Support of External References on Export: the External References functionality is available only with AP214. For more
information about the Customizing export mode, refer to Customizing STEP Setting in CATIA - Infrastructure User's Guide.
The table entitled STEP Part 42 Entities Exported from V5R6 and Higher provides information on the entities you can export.
You can automate Data exchanges between CATIA V5 and STEP using VBScript macros. The process is explained in the last
part entitled Exporting Using VBScript Macros.
1. Open the CATPart or CATProduct document to be saved in STEP AP203 / AP214 format.
2. When the document is open, select the File -> Save As... command.
The Save As dialog box is displayed:
3. Specify the name you want to give to the STEP file in the File name: field.
4. Set the .stp extension in the Save as type field.
You will remember that the extension used in V4 was .step. In Version 5, CATPart and CATProduct documents are exported to
files with the extension "stp".
6. If STEP AP203 and AP214 licenses (STEP AP203 Interface 1, ST1, and the STEP AP214 Interface 1, SI1) are available, you
can choose the Application Protocol in Tools -> Options -> Compatibility, click the STEP tab. Select AP203 or AP214 and click on
OK.
7. Consult the report file (name_of_step_file.rpt) and the error file (name_of_step_file.err) generated by the import operation.
These files are created in a location referenced by the CATReport variable. On Windows the default value of this variable is
Profiles\user\Local Settings\Application Data\Dassault Systemes\CATReport and on UNIX it is $HOME/CATReport.
After the recovery of STEP files, CATIA V5 generates a report file. In this file you can find references about the quality of the
transfer.
When a CATProduct document is exported the geometry/topology of the CATPart documents is also stored in the .stp file.
OpenShell (GSM,
Not generated by
Not generated by V5 Wire (GSM, Free Style, etc.) Shape Design, Free PartBody
V5
Style, etc.)
Point
cartesian_point
Curve
line thru edge_curve N/A
polyline N/A
b_spline_curve
(+ rational)
thru edge_curve N/A
b_spline_curve_with_knots
quasi_uniform_curve
N/A
(+rational)
bezier_curve N/A
Surface
plane N/A N/A N/A
b_spline_surface
N/A N/A N/A N/A
b_spline_surface_with_knots
Topology
vertex_point N/A N/A thru edge_curve N/A
face_bound
N/A N/A N/A N/A
face_outer_bound
Language="VBSCRIPT"
Sub CATMain()
Dim PartDocument0 As Document
' Reading a CATPart file
Set PartDocument0 = CATIA.Documents.Open ( "E:\tmp\Box.CATPart" )
' Saving the part in a STEP file
PartDocument0.ExportData "E:\tmp\Box2", "stp"
CATIA.Quit
End Sub
Macro for exporting a CATIA V5 CATProduct file to STEP AP203
Language="VBSCRIPT
Sub CATMain()
Dim ProductDocument0 As Document
Set ProductDocument0 = CATIA.Documents.Open ( "E:\tmp\Product1.CATProduct" )
ProductDocument0.ExportData "E:\tmp\Product1", "stp"
CATIA.Quit
End Sub
Importing a 3D IGES File into a CATPart
This task shows you how to import into a CATPart document the data contained in an IGES file.
Once imported, the data can be handled just as if it were created as a CATPart. The main purpose of such an import is to
be able to create shells from IGES faces but you may also find it useful for re-using face contours in the Sketcher
application, deforming NURBs in Generative Shape Design or using faces in other CATIA applications.
The second task, entitled The Management of KO Faces, shows you how to recover a maximum of the faces' geometry,
the topology of which could not be built when importing an IGES file into a Version 5 CATPart document.
In the lower part entitled What about the Elements You can Import, there is a list presenting the IGES data supported
when imported into a CATPart document.
You can automate Data exchanges between CATIA V5 and IGES using VBScript macros. The process is explained in the
last part entitled Importing Using VBScript Macros.
2. If the directory contains many different types of files you may wish to set the .igs extension in the Files of type field.
This displays all files with the extension "igs" contained in the selected directory.
In Version 5, both files with the extension "igs" and IGS can be imported to a CATPart document.
In case you used to handle several parts in one single IGES Model, make sure that each part corresponds to an
associativity instance (402). There will be one Join per associativity instance.
The Join operation may fail in specific topological configurations.
The import operation generates a report file (name_of_saved_file.rpt) and an error file (name_of_saved_file.err). These
files are created in a location referenced by the USERPROFILE variable on NT and by the HOME variable on UNIX. The
default location is the folder Profiles\user\Local Settings\Application Data\Dassault Systemes\ on Windows NT (where
"username" is your logon id) or the CATReport directory in your home directory on UNIX.
In the report file, you can find references about the quality of the transfer.
2. Click on the SHOW / NO SHOW icon to see the KO faces. The faces' support surfaces are in a specific red color
and you can see the pink outline of the faces which corresponds to the 2D Curves. The outline of 3D Curves is blue.
4. Finally the user can repair the KO faces manually in the Shape Design workbenche.
To make sure the elements you need to handle in your session are those you expected, here is a list presenting the IGES
data supported when imported into a CATPart document:
* Only the Geometry type curves "Curve on a parametric surface" and "Boundary" are taken into account for face creation. 2D
Parametric type curves are ignored.
Notice that elements contained in dittos are imported as simple elements (dittos are exploded).
Importing Using VBScript Macros
You can automate Data exchanges between CATIA V5 and IGES using VBScript macros.
Operating mode:
create a RunTime window (window in which all runtime variables a set)
type the command: cnext –macro MyMacro.CATScript
where MyMacro.CATScript is the VBScript macro you want to execute
Limitations:
The input files must be writable (not read only). Otherwise CATIA will display an information box and wait for an
acknowledge.
The output file must not exist in the output directory otherwise CATIA will ask for a confirmation to overwrite the file and
wait for an acknowledge.
Recommended practices:
You can transfer several files within the same macro, but it is recommended to do only one transfer per macro.
Example:
Language="VBSCRIPT"
Sub CATMain()
Dim Document0 As Document
' Reading an IGES file
Set Document0 = CATIA.Documents.Open ( "E:\tmp\Box.igs" )
' Saving the corresponding CATPart
CATIA.ActiveDocument.SaveAs "E:\tmp\Box"
CATIA.Quit
End Sub
Importing a 2D IGES File into a CATDrawing
This task shows you how to import into a CATDrawing document the data contained in a 2D IGES file.
Once imported, the data can be handled just as if it were created as a CATDrawing.
1. Select the File -> Open command.
The File Selection dialog box is displayed.
2. If the directory contains many different types of files you may wish to set the .ig2 extension in the
Files of type field. This displays all files with the extension "ig2" contained in all the selected directory.
3. Select the .ig2 file of your choice and click Open.
This creates a new document similar to a CADrawing document in all respects and containing all 2D
geometry and annotations. The data is now available in your session.
The import operation generates a report file (name_of_file.rpt) and an error file (name_of_file.err).
These files are created in a location referenced by the USERPROFILE variable on NT and by the
HOME variable on UNIX. The default location is the folder Profiles\user\Local Settings\Application
Data\Dassault Systemes\on Windows NT (where "username" is your logon id) or the CATReport
directory in your home directory on UNIX.
You can automate Data exchanges between CATIA V5 and STEP using VBScript macros. The process is
explained in the last part entitled Exporting Using VBScript Macros.
6. Click OK.
You can also use the Tools->Options->General->Compatibility->IGES tab to enter the information mentioned
above.
IGES 5.3 (year 2000-compliant) is the standard supported.
The export operation generates a report file (name_of_saved_file.rpt) and an error file
(name_of_saved_file.err). These files are created in a location referenced by the USERPROFILE variable on
NT and by the HOME variable on UNIX. The default location is the folder Profiles\user\Local
Settings\Application Data\Dassault Systemes\CATReport on Windows NT (where "user" is your logon id) or
the CATReport directory in your home directory on UNIX.
In the report file you can find references about the quality of the transfer.
The topology of solids and shells is lost during the export. As a consequence, you have a group of surfaces
called an Open Body. If you make an Import with Join, therefore you can get a Close Body.
When a CATProduct is exported, the component .igs and .model files are not stored in the .igs file.
Each component of a CATProduct document is translated by a subfigure definition / singular subfigure
instance in the .igs file.
Language="VBSCRIPT"
Sub CATMain()
Dim PartDocument0 As Document
' Reading a CATPart file
Set PartDocument0 = CATIA.Documents.Open ( "E:\tmp\Box.CATPart" )
' Saving the part in a IGES file
PartDocument0.ExportData "E:\tmp\Box2", "igs"
CATIA.Quit
End Sub
Importing a DXF/DWG file into a
CATDrawing
This task lets you quickly see how to import or to insert the geometric data
contained in a DXF file into a CATDrawing document. Once imported, the data
can be handled and edited just as if they had been created in a Drafting session
using 2D geometry creation commands.
Open your session (Open your CATDrawing document if you want to insert a
DXF file.).
1. To import an existing DXF/DWG file, select the File-> Open items.
2. Select
the.dxf/
extension
from the
field
called
Files of
type.
All .dxf
files
contained
in the
selected
directory
are now
displayed.
3. Click
the .dxf
file of
your
choice.
For
example,
click the
draw1.dxf
file.
4. Click
Open.
Note that Version 5 supports DXF/DWG formats version 12,13, 14 and
Autocad2000.
When importing a DXF/DWG file in CATIA, the display of small entities may
depend on zoom factor. In order to see the complete Drawing regardless of
their size you have just to modify in the settings
Tools->Options->General->Display->Performance the values of "Level of
detail/static" to zero if you wish to see all geometries. For more information, see
Performance.
When importing an Autocad2000 DXF or DWG file (this format is automatically
recognized) the "weight"property of each entity is mapped to the nearest
available CATIA line weight. The current CATIA line weights are visible and
customizable through the menu Tools->Options->General->Display->Thickness.
A CATDrawing file is created which contains all the geometry included in the dxf
file. This .CATDrawing file becomes the current document.
You may select the most suitable import unit using the import options :
Tools->Options->General->Compatibility->DXF commands.
If you check:
CATIA dimension + Details: linear dimensions will be preserved, others
will be transformed into details,
Details: dimensions are turned into details,
Exploded geometry: geometry is exploded, check this option to keep the
graphical aspect (this mode increase performance when loading a
model).
When importing a DXF/DWG file in CATIA, the display of small entities may
depend on zoom factor. In order to see the complete Drawing regardless of
their size you have just to modify in the settings
Tools->Options->General->Display->Performance the values of "Level of
detail/static" to zero if you wish to see all geometries. For more information, see
Performance.
(1) CATIA polylines are created if DXF/DWG polylines contain only lines (no arcs) and
have unique line weight, else geometry will be created (with fill area if variable line
weight).
(2) the details are created in a new Detail Sheet named "DXF Details".
(3) if the insertion is defined with different scales, on x-axis and y-axis, you do not
create detail instance but only the geometry is transferred.
The unsupported entities are : 3Dface, 3Dsolid, arc aligned text, image, OLE frame,
region, text, tolerance (GD&T) and viewport.
Inserting a DXF/DWG file into an Existing
CATDrawing
This task lets you quickly see how to insert a dxf or dwg file into a CATDrawing document. Once imported, the
data can be handled and edited just as if they had been created in a Drafting session using 2D element creation
commands.
All the element included in the dxf or dwg file is now included in the CATDrawing file.
All the settings of the imported dxf or dwg file are taken into account.
Using the import options, Tools->Options->General->Compatibility->DXF, you can define:
that you import a file either in the working or the background views,
the dimensions import settings:
If you check:
CATIA dimension + Details: linear dimensions will be preserved, others will be transformed into details,
Details: dimensions are turned into details,
Exploded geometry: geometry is exploded, check this option to keep the graphical aspect (this mode
increase performance when loading a model).
All that was explained in Importing a DXF/DWG File into a CATDrawing is also true for Inserting for a DXF/DWG
File into an existing CATDrawing. For more information, see the Table about the imported entities.
Exporting a CATDrawing Document's Data into a
DXF or DWG File
This task quickly shows you how to export the data contained in a CATDrawing document into a DXF file.
Drawing Interchange Format (DXF) files enable the interchange of drawings between Generative Drafting
Version 5 and Version 4 or with other programs.
DXF files correspond to ASCII format and DWG to binary format.
Version 5 provides a simple method to export the data contained in a CATDrawing document either in a
DXF file or in a DWG file.
4. Press SAVE.
The same method applies to DWG file export.
In the case of a multi-sheet drawing, customize the export options according to your needs. The option
"Only current sheet" exports the data to a file with the name entered in the Save as dialog box. The option
"All sheets" exports the data to several files. The name of each file is made of the name entered in the
Save as dialog box and the name of the sheet (Drawing1_sheet_1.dxf, Drawing_sheet_2.dxf, ...).
Note that when working with CATIA Version 4, if you open a DXF or DWG file created in Version 5, you
need to set the curve tolerance to 0.0001 (0.1 as default).
Note that the resulting file corresponds to versions 12, 13 and 14 DXF/DWG format and Autocad2000.
When exporting a CATIA Drawing with Autocad2000 format (See DXF Import / Export Format) the current
line weight of each element is mapped to the nearest DXF available line weight. The current CATIA line
weightsare visible and customizable through the menu Tools->Options->General->Display->Thickness.
1. Select
the File ->
Save As
item.
The Save
As dialog
box is
displayed:
2. Change
the Save
as type
into CGM
type.
3. Enter
the file
name.
4. Press
Save.
Inserting a CGM file into a CATDrawing
This task will show you how to insert a cgm file into a CATDrawing document.
2. Select the .cgm extension from the field called Files of type.
If you use the command File -> Open (you must select the .cgm extension from the field called Files of type), you
only browse the cgm file.
Exporting CATPart Data to an STL
File
This task shows you how to save your part as an STL (stereolithography)
document (.stl).
1. Select the File -> Save As... command.
2. In the Save As dialog box, select the location of the document to be saved.
2. When the document is open, select the File -> Save As... command.
The Save As dialog box is displayed:
3. Specify the name you want to give to the 3D document in the File name: field.
Display services
Graphic context (current view
Yes Yes Not processed
point)
Visibility list (Show/No Show
Yes Yes Show/No Show Hidden elements
list)
Elements inherit their
Entities layer Yes Yes Layer
original layer number
Layer filter Yes Yes Not processed
Drafting application
2D Drafting Yes No Not processed
Meshing application
Mesh elements Yes No Not processed
Machining application
Milling point Yes No Not processed
Rendering application
Textures No Yes Not processed
Customizing
This section describes the different types of setting customization you can perform
using the Tools -> Options command.
You can apply a scale factor between the imported file and what you want to get from the original Drawing.
Imported file destination, either working view or background sheet.
Import Space Configuration:
This functionality allows you to choose which drawing space you want to import : Model Space or Paper
Space or Both.
A default mapping is available, but you can use this option to customize the mapping of the line types used
by DXF and by CATIA.
To map a new DXF line type, enter its name in the input field, select the corresponding CATIA line type in the
next combo box and click Add.
To modify the mapping of an existing DXF line type, double-click this type in the list, select the new CATIA
line type and click Add.
For better performances, do not hesitate to remove useless types from the mapping list using the Remove
button.
CATIA dimension + Details: linear dimensions will be preserved, others will be transformed into details,
Details: dimensions are turned into details,
Exploded geometry: geometry is exploded, check this option to keep the graphical aspect (this mode
increase performance when loading a model).
Export all sheets in distinct files: export either all sheets or only current sheet of a multi-sheet drawing.
You can export either all sheets or only current sheet of a multi-sheet drawing.
2. Select the General category, then the Compatibility category, then click the IGES tab.
If you select the join option, while importing IGES files to CATIA, make sure that model is constituted of one part.
In case you used to handle several parts in one single IGES Model, make sure that each part corresponds to an
associativity instance (402).
The import operation generates a report file (filename.rpt) and an error file (filename.err). These files are created
in a location referenced by the USERPROFILE variable on NT and by the HOME variable on UNIX. The default
location is the folder Profiles\user\Local Settings\Application Data\Dassault Systemes\CATReport on Windows NT
(where "user" is your logon id) or the CATReport directory in your home directory on UNIX.
3. Click OK.
Customizing STEP Settings
This task shows you how to customize STEP settings.
2. Select the General category, then the Compatibility category, then click the STEP tab.
Structure and Geometry in one file: one STEP file only containing the structure and geometry of the
components. This is the option by default.
External References: The STEP file names, for each component, have the same name as the CATPart's.
Structure only: a STEP file containing structure and entities
PRODUCT_DEFINITION_WITH_ASSOCIATED_DOCUMENT which have a link with CATPart files.
This summary table shows you all the possible combinations within the first two frames, Export : Application
Protocol and Export : Assemblies.
With the ST1 or SI1 license or both:
Frame Export AP
--------- 203 (1) 214 (2)
Frame Export Assemblies
Structure and Geometry in
YES YES
one file (3)
External References (4) NO (inactive button) YES
Structure only (5) YES YES
If you have no license, you can choose either AP203 or AP214, but the following buttons remain inactive:
Structure and Geometry in one file
External References
Export : Units
mm (millimeter)
Inch
The purpose is to export a CATPart or a CATProduct in STEP format and in Inch or millimeter independently of
the CATIA Session unit, by selecting either mm or Inch.
3. Click OK.