User's Guide > Interface: Data Exchange > Importing 2D Models
Importing 2D Models
 
Import Format
Functions
Type Constant
STEP file
PRO_STEP_FILE
IGES (2D) file
PRO_IGES_FILE
DXF file
PRO_DXF_FILE
DWG file
PRO_DWG_FILE
CGM file
PRO_CGM_FILE
MEDUSA file
PRO_MEDUSA_FILE
Creo Elements/Direct drafting files (.mi, .bi, and .bdl)
PRO_CCD_DRAWING_FILE
IGES (2D) file
PRO_IGES_SECTION
Functions Introduced:
The function Pro2dImportMdlnameCreate() imports interface files and creates a new two-dimensional model with the specified name. The created models can be drawings, layouts, diagrams, drawing formats. Use the argument to control whether or not to import two-dimensional views.
If you want to import all the drawing sheets for formats that support multiple drawing sheets, use the function Pro2dImportAllSheets(). The function imports interface files with all the drawing sheets, and creates a new two-dimensional model. For the model type PRO_MDL_DWGFORM, only the first two drawing sheets are imported.
The function Pro2dImportAppend() appends a two-dimensional model to the specified model.
You can import and append the Creo Elements/Direct drafting files using the functions Pro2dImportMdlnameCreate() and Pro2dImportAppend().
Use the function Pro2dImportMdlnameCreate() to import the Creo Elements/Direct drafting file to a drawing file. The following data is imported from the .mi, .bi, and .bdl format files:
Basic entities such as point, line, arc, fillet, circle, polygon, text, spline, b-spline, center line, symmetry line, reference text line, and projected reference points
2D construction geometry such as lines, arcs, circles, splines, and so on
Linear, angular, radial, diameter, ordinate, and leader dimensions
Tolerance values in dimensions
Leader and non-leader notes
Annotation views
Drawing sheets, symbol, views, and layers
The attributes of color, layers, line types, and text fonts
All types of hatch including user-defined hatches
You can set the mapping options in the mapping file mi_import.pro. The entity attributes such as color, line type, text fonts, leader arrow styles and so on are imported from Creo Elements/Direct drafting files to drawing files depending on the settings in the mapping file.
Refer to the Data Exchange Help for more information on importing Creo/Elements Direct drafting files in drawing file.
Use the function ProInputFileRead() with the argument PRO_IGES_SECTION to import a 2D IGES section into a sketch.
這是否有幫助?