User's Guide > Interface: Data Exchange > Importing 3D Models
Importing 3D Models
 
The functions described in this section are used to import files of different format types into Creo Parametric.
Functions Introduced:
Import Format
Creo TOOLKIT Functions
Type Constant
ACIS file
PRO_INTF_IMPORT_ACIS
CADDS file
PRO_INTF_IMPORT_CADDS
CATIA (.model) file
PRO_INTF_IMPORT_CATIA_MODEL
CATIA (.session) file
PRO_INTF_IMPORT_CATIA_SESSION
DXF file
PRO_INTF_IMPORT_DXF
ICEM file
PRO_INTF_IMPORT_ICEM
IGES file
PRO_INTF_IMPORT_IGES
Neutral file
PRO_INTF_IMPORT_NEUTRAL
Parasolid-based CADDS system file
PRO_INTF_IMPORT_PARASOLID
POLTXT file
PRO_INTF_IMPORT_POLTXT
STEP file
PRO_INTF_IMPORT_STEP
VDA file
PRO_INTF_IMPORT_VDA
CATIA (.CATpart) file
PRO_INTF_IMPORT_CATIA_PART
UG file
PRO_INTF_IMPORT_UG
Creo View (.ol and .ed) files
PRO_INTF_IMPORT_PRODUCTVIEW
JT Open format
PRO_INTF_IMPORT_JT
CATIA Graphical Representation (CGR) format
PRO_INTF_IMPORT_CATIA_CGR
SolidWorks Part (.sldprt) file
PRO_INTF_IMPORT_SW_PART
SolidWorks Asembly (.sldasm) file
PRO_INTF_IMPORT_SW_ASSEM
Inventor Part (.ipt) file
PRO_INTF_IMPORT_INVENTOR_PART
Inventor Assembly (.iam) file
PRO_INTF_IMPORT_INVENTOR_ASSEM
STL file
PRO_INTF_IMPORT_STL
VRML file
PRO_INTF_IMPORT_VRML
CATIA (.product) file
PRO_INTF_IMPORT_CATIA_PRODUCT
Creo Elements/Direct file (Assemblies and parts)
bundle—.bdl
modeling —soliddesigner .sda, .sdp,.sdac, and .sdpc
package—.pkg
PRO_INTF_IMPORT_CC
Solid Edge Part (.par) file
PRO_INTF_IMPORT_SEDGE_PART
Solid Edge Assembly (.asm) file
PRO_INTF_IMPORT_SEDGE_ASSEMBLY
Solid Edge Sheet metal (.psm) file
PRO_INTF_IMPORT_SEDGE_SHEETMETAL_PART
3D Manufacturing Format (3MF)
PRO_INTF_IMPORT_3MF
The following data is included during the import of models from other formats to Creo Parametric:
3D Manufacturing Format (3MF)—From Creo Parametric 5.0.1.0 onward, you can import 3MF files containing part and assembly models to Creo Parametric. You can import part-level colors, top-assembly parameters, and facet geometry from 3MF models to Creo Parametric.
Autodesk Inventor—You can import Autodesk Inventor models to Creo Parametric. The import includes basic geometry such as solids, quilts, and surfaces from Autodesk Inventor models to Creo Parametric. You can also import datum features, colors, attributes, and wire body datum curves from Inventor part and assembly models.
Note:
 
Depending on the Autodesk Inventor model, Creo Parametric imports the model as a part or an assembly. To let Creo Parametric decide if the Autodesk Inventor model must be imported as a part or assembly, in the function ProIntfimportModelWithOptionsMdlnameCreate(), you must specify the input argument ProMdlType as PRO_MDL_UNUSED.
JT—JT models are imported to Creo Parametric with their color overrides. Components with color overrides at any level in an assembly structure are supported.
From Creo Parametric 3.0 onward, the Product Manufacturing Information (PMI) of the annotations is imported as semantic representation from JT models to Creo Parametric models. The semantic import is supported only for 3D notes and basic dimensions. All the other types of annotations are imported as graphical entities. You can import the planar and zonal cross-sections of part and assembly models from JT files to Creo Parametric.
Note:
 
From Creo Parametric M200 2.0 onward, the license INTF_for_JT is required to import a JT file to Creo Parametric. If the license is not available the functions return the error PRO_TK_NO_LICENSE.
Creo Elements/Direct—From Creo Parametric 3.0 onward, the Product Manufacturing Information (PMI) of the annotations is imported as semantic representation fromCreo Elements/Direct models to Creo Parametric models. The semantic import is supported only for 3D notes and basic dimensions. All the other types of annotations are imported as graphical entities. You can also import the clipping features owned by the Creo Elements/Direct part and assembly models as cross-sections in Creo Parametric.
Creo View—You can import colors assigned to the components of assemblies and their sub-assembly models, including the colors of the sub-level entities such as parts, quilts, and faces from Creo View to Creo Parametric. Creo View models are imported to Creo Parametric with their color overrides. Components with color overrides at any level in an assembly structure are supported. Along with components, color overrides are also supported for component model items, such as, face and quilts.
SolidWorks—You can import basic geometry such as solids, quilts, and surfaces from SolidWorks models to Creo Parametric. The import includes datum features, colors, attributes, and layers.
Note:
 
Depending on the SolidWorks model, Creo Parametric imports the model as a part or an assembly. To let Creo Parametric decide if the SolidWorks model must be imported as a part or assembly, in the function ProIntfimportModelWithOptionsMdlnameCreate(), you must specify the input argument ProMdlType as PRO_MDL_UNUSED.
Solid Edge—From Creo Parametric 3.0 M010 onward, you can import Solid Edge part and assembly models to Creo Parametric. The import includes boundary representation geometry, datum features, colors, and attributes.
From Creo Parametric 3.0 M030 onward, Solid Edge models are imported to Creo Parametric with their color overrides. Components with color overrides at any level in an assembly structure are supported.
From Creo Parametric 3.0 M020 onward, you can also import a Solid Edge sheet metal part to Creo Parametric.
Note:
 
Depending on the Solid Edge model, Creo Parametric imports the model as a part or an assembly. To let Creo Parametric decide if the Solid Edge model must be imported as a part or assembly, in the function ProIntfimportModelWithOptionsMdlnameCreate(), you must specify the input argument ProMdlType as PRO_MDL_UNUSED.
Unigraphics—You can import basic geometry such as solids, quilts, and surfaces from Unigraphics models to Creo Parametric. The import includes datum features, colors, attributes, and layers.
Note:
 
Depending on the Unigraphics model, Creo Parametric imports the model as a part or an assembly. To let Creo Parametric decide if the Unigraphics model must be imported as a part or assembly, in the function ProIntfimportModelWithOptionsMdlnameCreate(), you must specify the input argument ProMdlType as PRO_MDL_UNUSED.
Note:
 
Refer to the Creo Parametric Data Exchange Help for more information on importing geometry to Creo Parametric. Refer to the compatibility matrix on PTC.com for the supported software versions.
The function ProIntfimportSourceTypeGet() is a utility that returns the type of model that can be created from the geometry file. This function is not applicable for all formats. If this function is not valid for a geometric file, you will need to know the type of model you want to create (part, assembly, or drawing).
The function ProIntfimportWithProfileSourceTypeGet() determines the type of model expected to be created by the import operation based on the profile settings. The input arguments follow:
import_file—Full path to the import file.
profile_file—Full path to the profile file. If the value of this argument is passed as NULL, the default profile is used.
type—The type of file to be imported.
The output argument of the function mdl_type is the type of model that can be created from the specified import file and profile settings.
The function ProIntfimportModelWithOptionsMdlnameCreate() imports objects of other formats using a profile and creates a new model or set of models with the specified name and representation. Once the profile is set, it remains valid for the entire session unless it is reset with another profile. The input arguments of this function are:
import_file—Full path to file to be imported.
profile—The import profile path. An import profile is an XML file with the extension .dip. It contains the options that control an import operation. It also contains all the options for the supported 3D import formats. Refer to the Creo Parametric Online Help for more information on creation and modification of import profiles.
Note:
 
The input argument profile allows you to include the import of Creo Elements/Direct containers, face parts, wire parts, and empty parts.
type—The type of file to be imported.
The following formats are supported for importing structure and graphics level of details:
Creo View (i.e. Product View, .ol, .ed, .edz, .pvs, .pvz) files (PRO_INTF_IMPORT_PRODUCTVIEW)
CATIA V5 (CATPart (PRO_INTF_IMPORT_CATIA_PART, CATProduct (PRO_INTF_IMPORT_CATIA_PRODUCT), CGR (PRO_INTF_IMPORT_CATIA_CGR)) files
SolidWorks (.sldprt (PRO_INTF_IMPORT_SW_PART), .sldasm(PRO_INTF_IMPORT_SW_ASSEM)) files
Unigraphics NX (PRO_INTF_IMPORT_UG) files
create_type—The type of model to create. This could be part, assembly, or drawing (for STEP associative drawings).
rep type—The representation type to be used for importing. The enumerated type ProImportRepType defines the representation type and has the following values:
PRO_IMPORTREP_MASTER—This is the default import type. It imports the geometric and the nongeometric data (annotations, datums, coordinate systems, creation of features and so on) of the assembly and displays the full representation of the assembly.
PRO_IMPORTREP_STRUCTURE—Imports the product structure or the meta data of the assemblies.
PRO_IMPORTREP_GRAPHICS—Imports the display data of the assemblies.
Note:
 
The import representation types PRO_IMPORTREP_STRUCTURE and PRO_IMPORTREP_GRAPHICS do not create model geometry in Creo Parametric, although they allow the import of the fully-functional assemblies.
new_model_name— The name of the new top level import model.
filter_func—Callback to the function ProIntfimportLayerFilter() that determines how to display and map layers from the imported model. If this is NULL, the default layer handling will take place.
application_data—The application data to be passed to the filter function. Can be NULL.
created_model—The handle to the created model (in case of an assembly – the handle to the top assembly). Even if this is NULL, the model is created.
Note:
 
When importing an assembly using the function ProIntfimportModelWithOptionsMdlnameCreate() if any component of the assembly is missing, then during import an empty placeholder with the missing component name is created in the model tree. For example, during import if the missing component is a part, an empty part is created. Similarly, if the missing component is a subassembly, then an empty subassembly is created. Placeholders for missing components are created only for the following formats:
CATIA V5
CATIA V4
Unigraphics
CADDS 5
SolidWorks
Creo View (.ol and .ed) files
JT Open format
Use the function ProIntfimportModelWithOptionsMdlnameCreate() with profile as NULL and rep type (representation type) as PRO_IMPORTREP_MASTER.
From Creo Parametric 3.0 M080 onward, the function ProIntfimportModelWithOptionsMdlnameCreate() imports a JT file to Creo Parametric only if the license INTF_for_JT is available. If the license is not available the functions return the error PRO_TK_NO_LICENSE.
From Creo Parametric 2.0 M200 onward, the function ProIntfimportModelWithProfileCreate() imports a JT file to Creo Parametric only if the license INTF_for_JT is available. If the license is not available the functions return the error PRO_TK_NO_LICENSE.
The function ProIntfimportModelWithProfileCreate() imports objects of other formats using a profile and creates a new model or set of models with the specified name.
The function ProIntfimportModelWithProfileCreate() has been deprecated. Use the function ProIntfimportModelWithOptionsMdlnameCreate() instead with PRO_IMPORTREP_MASTER as the representation type.
The function ProIntfimportLayerFilter() is a callback function that allows your application to determine the status of each of the imported layers. You can modify the layer information using the functions described in the next section.
这对您有帮助吗?