Interface: Importing Features
This section describes how to create import features in Creo Parametric.
Note
PTC strongly recommends that you create import features in a Creo Parametric session that has only those models open where the feature is to be created. It is also recommended not to follow the creation of import features with calls to the functions ProMdlErase() or ProMdlEraseAll() until the control returns to Creo Parametric, since this may interfere with erasing temporary objects at the end of the import.
Creating Import Features from Files
To create import features in Creo Parametric from external format files use the functions described in this section.
Functions Introduced:
Superseded Functions
The function ProIntfDataSourceInit() is used to build the interface data source required by the functions ProImportfeatCreate() and ProImportfeatureWithProfileCreate().
The input arguments of this function are:
•  intf_type—Specifies the type of file to import. The valid format files from which the user can create the import features are specified in the enumerated data type ProIntfType:
Type Constant
Import Format
PRO_INTF_NEUTRAL_FILE
Neutral file
PRO_INTF_IGES
IGES 3D file
PRO_INTF_STEP
STEP file
PRO_INTF_VDA
VDA file
PRO_INTF_SET
SET file
PRO_INTF_PDGS
PDGS file
PRO_INTF_ICEM
ICEM file
PRO_INTF_ACIS(*.sat)
ACIS format file
PRO_INTF_DXF
DXF file
PRO_INTF_CDRS
CDRS file
PRO_INTF_STL
STL file
PRO_INTF_VRML
VRML file
PRO_INTF_PARASOLID
Parasolid-based CADDS system file
PRO_INTF_AI
AI file
PRO_INTF_CATIA_PART
CATIA (.CATpart) file
PRO_INTF_UG
UG file
PRO_INTF_PRODUCTVIEW
Creo View (.ol) files
PRO_INTF_CATIA_PRODUCT
CATIA V5 Assembly file
PRO_INTF_CATIA_CGR
CATIA Graphical Representation (CGR) format
PRO_INTF_JT
JT Open Interface
PRO_INTF_INVENTOR_PART
Inventor Part (.ipt) file
PRO_INTF_INVENTOR_ASM
Inventor Assembly (.iam) file
PRO_INTF_SE_PART
Solid Edge part (.par) file
PRO_INTF_SE_SHEETMETAL_PART
Solid Edge Sheet metal (.psm) file
PRO_INTF_3MF
3D Manufacturing Format (3MF)
•  p_source—the name of the file with extension. The specified format file should exist in the current working directory or in a path specified in the search_path configuration option.
This function returns the handle to the ProIntfDataSource object, which should be passed to the functions ProImportfeatCreate() and ProImportfeatureWithProfileCreate().
The function ProImportfeatCreate() is used to create a new import feature in the Creo Parametric solid model. The input arguments of this function are:
•  p_solid —Specifies the part in which the user wants to create the import feature.
•  data_source—Specifies a pointer to the interface data source. Use the function ProIntfDataSourceInit() to get the handle to the ProIntfDataSource object.
•  p_csys — Specifies the coordinate system of the part with which the user wants to align the import feature. If this is NULL, the function uses the default coordinate system in the Creo Parametric model and the import feature will be aligned with respect to this coordinate system.
•  p_attributes—Specifies the attributes for the creation of the new import feature. Please see the section Import Feature Attributes for more information.
Note
From Creo Parametric 2.0 M200 onward, the function ProImportfeatCreate() imports a JT file to Creo Parametric only if the license INTF_for_JT is available. If the license is not available the function returns the error PRO_TK_NO_LICENSE.
The function ProImportfeatCreate() returns the ProFeature handle for the created import feature.
In Creo Parametric 7.0.0.0 and later, the function ProImportfeatWithProfileCreate() is deprecated. Use the function ProImportfeatureWithProfileCreate() instead.
The function ProImportfeatureWithProfileCreate() is used to create a new import feature in the Creo Parametric solid model. The input arguments follow:
•  p_solid—Pointer to the solid part. Assembly case is not supported.
•  data_source—Source of data to create the import feature.
•  p_csys—Pointer to the reference coordinate system. If this is NULL, the function uses the default coordinate system.
•  profile—Path to the import file. If this value is NULL, the function ProImportfeatureWithProfileCreate() works same as ProImportfeatCreate().
Note
An import profile is an XML file with the extension dip (Dex In Profile) and contains the options that control an import operation. It contains all the options for the supported 3D import formats. Refer to the Creo Parametric Help for more information on creation and modification of import profiles.
•  cut_or_add—Set to PRO_B_TRUE for imported geometry representing a cut or PRO_B_FALSE otherwise.
•  body_use_opt—Generic body options.
•  body_arrProArray of bodies. Size of ProArray must be 1.
The output argument p_feat_handle is the handle to the new import feature. If this is NULL, the feature is still created.
Note
•  The function ProImportfeatureWithProfileCreate()( cannot create an import feature using an import profile for the STL and VRML formats. Once a profile is set, it remains valid for the entire session unless it is reset with another profile.
•  From Creo Parametric 2.0 M200 onward, the function ProImportfeatureWithProfileCreate() imports a JT file to Creo Parametric only if the license INTF_for_JT is available. If the license is not available the function returns the error PRO_TK_NO_LICENSE.
The function ProDatumcurveFromfileCreate() creates a new import feature containing a datum curve in the Creo Parametric model. The input arguments of this function are:
•  p_solid—Specifies the part in which you create the import feature.
•  full_file_name—Specifies the name of the file from which you create the import feature.
•  file_type—Specifies the file type to import. It is given by the ProIntfType enumerated type. The file types supported by this function are as follows.
Type Constant
Import Format
PRO_INTF_NEUTRAL_FILE
Neutral file
PRO_INTF_IGES
IGES 3D file
PRO_INTF_STEP
STEP file
PRO_INTF_VDA
VDA file
PRO_INTF_ACIS
ACIS format file
PRO_INTF_DXF
DXF file
PRO_INTF_AI
AI file
PRO_INTF_CATIA_PART
CATIA (.CATpart) file
PRO_INTF_UG
UG file
PRO_INTF_JT
JT Open Interface
PRO_INTF_IBL
IBL file
PRO_INTF_PTS
PTS file
For all other file types that are not supported, the function ProDatumcurveFromfileCreate() returns PRO_TK_INVALID_TYPE.
•  p_csys — Specifies the coordinate system of the part with which you align the import feature If this is NULL, the function uses the default coordinate system and the import feature is aligned with respect to this coordinate system.
Note
From Creo Parametric 2.0 M200 onward, the function ProDatumcurveFromfileCreate() creates a new import JT feature only if the license INTF_for_JT is available. If the license is not available the function returns the error PRO_TK_NO_LICENSE.
Creating Import Features from Arbitrary Geometric Data
You can create an import feature in a Creo Parametric model by building the required entity data in the Creo TOOLKIT application.
The advantages of importing features from a Creo TOOLKIT application are:
•  You can create virtually non-parametric user-defined geometry at a desired location. This is sometimes an alternative to parametric feature creation, which can be more complicated.
•  Import features are regenerated more quickly than corresponding groups of parametric features.
•  You can integrate Creo Parametric with non-Creo Parametric supported geometry file formats.
The following sequence of steps is required to create the import feature from memory:
•  Allocate the interface data.
•  Add surfaces, edges, quilts, and datums.
•  Create the import feature from the interface data.
These steps are described in detail in the following sections.
Allocating ProInterfacedata
Function Introduced:
Use the function ProIntfDataAlloc() to allocate memory for the interface data structure.
Adding Surfaces
Function Introduced:
Use the function ProSurfacedataAlloc() to allocate memory for the surface data. Once the surface data is initialized, it will be appended to the interface data.
Initializing Surface Data
Functions Introduced:
Use the function ProSurfacedataInit() to initialize the surface data structure.
The input arguments of this function are:
•  Surface_type—Specifies the type of surface to be created. The types of surfaces are:
  PRO_SRF_PLANE—Plane
  PRO_SRF_CYL—Cylinder
  PRO_SRF_CONE—Cone
  PRO_SRF_TORUS—Torus
  PRO_SRF_COONS—Coons Patch
  PRO_SRF_SPL—Spline Surface
  PRO_SRF_FIL—Fillet Surface
  PRO_SRF_RUL—Ruled Surface
  PRO_SRF_REV—General Surface of Revolution
  PRO_SRF_TABCYL—Tabulated Cylinder
  PRO_SRF_B_SPL—B-spline surface
  PRO_SRF_FOREIGN—Foreign Surface
  PRO_SRF_CYL_SPL—Cylindrical Spline Surface
The type of the surface determines the function to be used to initialize the surface data structure.For example, if the type of surface to be created is PRO_SRF_PLANE, then the function ProPlanedataInit() should be used to initialize the surface data structure
•  surf_uv_min—Specifies the minimum uv extents of the surface.
•  surf_uv_max—Specifies the maximum uv extents of the surface.
•  surf_orient—Specifies the orientation of the surface. By default the value is PRO_SURF_ORIENT_OUT
•  p_surf_shape—The data containing the information about the shape of the surface.
•  Surface_Id—Specifies a unique identifier of the Surface.
Depending on the shape of the surface, call one of the following functions to create the surface data structure ProSurfaceshapedata and assign it to variable p_surf_shape of function ProSurfacedataInit(). Ensure that the function used to create the ProSurfaceshapedata matches with the ProSrftype value used in ProSurfacedataInit().
•  ProPlanedataInit()
•  ProCylinderdataInit()
•  ProConedataInit()
•  ProTorusdataInit()
•  ProSrfrevdataInit()
•  ProTabcyldataInit()
•  ProRulsrfdataInit()
•  ProSplinesrfdataInit()
•  ProCylsplsrfdataInit()
•  ProBsplinesrfdataInit()
Note
Set the configuration option intf_in_keep_high_deg_bspl_srfs to YES to preserve the B-spline surfaces returned by ProBsplinesrfdataInit() in the ProIntData data structure. If this configuration option is not set, these surfaces are interpreted as spline surfaces.
•  ProFilsrfdataInit()
Refer to the Geometry Representations appendix for more information on how to use the above functions.
Note
The following return values for the functions ProBsplinesrfdataInit(), ProRulsrfdataInit(), ProSrfrevdataInit(), and ProTabcyldataInit() should be treated as warnings:
PRO_TK_BSPL_UNSUITABLE_DEGREE
PRO_TK_BSPL_NON_STD_END_KNOTS
PRO_TK_BSPL_MULTI_INNER_KNOTS
They indicate that the geometry finally imported in Creo Parametric is different from the geometry initially supplied to the above functions. The geometry is not rejected by the functions and is used to generate the ProSurfaceshapedata data structure.
Surfacedata Contours
The geometric representation of the surface created above is unbounded, that is the nature of the surface boundaries is determined by its array of contours. Multiple contours can be used for surfaces with internal voids.
Functions Introduced:
Use the function ProSurfacedataContourArraySet() to set an array of contours on the surface.
The input arguments of this function are:
•  p_surf_data—Specifies the surface data to which the array of contour data is to be set.
•  contour_array—Specifies an array of contours on the surface. The ProContourdata handle can be obtained by using the following functions in sequence:
ProContourdataAlloc()
ProContourdataInit()
ProContourdataEdgeIdArraySet()
Use the function ProContourdataAlloc() to allocate memory to the contour data structure.
Use the function ProContourdataInit() to initialize the contour data structure. The input argument of this function is:
•  contour_trav — Specifies the contour traversal. This parameter has the following values:
  PRO_CONTOUR_TRAV_INTERNAL—Internal Contour
  PRO_CONTOUR_TRAV_EXTERNAL—External Contour
The function returns the allocated contour data structure.
Use the function ProContourdataEdgeIdArraySet() to set identifiers to an array of edges, that form the boundary of the specified surface.
The input arguments of this function are:
•  p_contour_data—Specifies the contour data to which the array of edge identifiers have to be set.
•  edge_id_arr—Specifies the array of edge identifiers. These identifiers must be same as those provided in the ProEdgedata structures described below.
For example, if the surface is bounded by 4 edges, then the identifier of each edge should be assigned to each element of an array of integers of size 4.
Appending the Surface Data to the Interface Data
Function Introduced:
Use the function ProIntfDataSurfaceAppend() to append the surface data into the interface data.
Repeat the sequence for each surface desired in the import feature.
Adding Edges
Functions Introduced:
If the import feature to be created requires any edge information, then call the functions list above in sequence, else skip this section.
Use the function ProEdgedataAlloc() to allocate memory for the edge data structure. After initialization, this data will be appended to the interface data.
Use the function ProEdgedataInit() to initialize the edge data structure. The following are the input arguments:
•  edge_id — Specifies a unique identifier of the edge.
•  edge_surf_ids—Specifies the ID of the surfaces on either side of the edge.
•  edge_directions —Specifies the edge directions on the surface.
•  edge_uv_point_arr —Specifies an array of UV points on the surfaces. The value can be NULL.
•  p_edge_uv_curve_data—Specifies the edge UV curves on the surfaces. The value can be NULL.
•  p_edge_curve_data—Specifies the curve data handle in the form of the ProCurvedata structure. This data handle is returned by the functions ProLinedataInit(), ProArcdataInit(), ProEllipsedataInit(), ProSplinedataInit(), or ProBsplinedataInit(). Use the function ProCurvedataFree to free the ProCurvedata data handle.
Note
PTC recommends that you split the closed loop edge into two or more continuous edges while specifying the inputs to the function ProEdgedataInit(). For example, to create a circular edge, instead of specifying the start angle as 0 and the end angle as 360, split the circular edge into 2 or more edges. The angular measurements of the split edges could be 0 to 30 for the first split and 30 to 360 for the second split. The function ProEdgedataInit() must be called for each split.
Use the function ProCurvedataAlloc() to allocate memory for the curve data structure. The curve data structure defines the edge profile.
Depending on the type of curve specified for the edge, call one of the following functions to initialize the curve data.
•  ProLinedataInit()
•  ProArcdataInit()
•  ProEllipsedataInit()
•  ProSplinedataInit()
•  ProBsplinedataInit()
Use the function ProLinedataInit() to initialize the line data structure. Specify the start of the line and end of the line as inputs of this function.
Use the function ProArcdataInit() to initialize an arc data structure. The input arguments of this function are:
•  vector1—Specifies the first vector of the arc coordinate system.
•  vector2—Specifies the second vector of the arc coordinate system.
•  origin—Specifies the center of the arc coordinate system
•  start_angle—Specifies the starting angle (in radians) of the arc.
•  end_angle —Specifies the end angle (in radians) of the arc.
•  radius —Specifies the radius of the arc.
Use the function ProEllipsedataInit() to initialize an ellipse data structure. The input arguments of this function are:
•  center—Specifies the center of the ellipse.
•  x_axis—Specifies the first (x) axis vector of the ellipse.
•  plane_normal—Specifies the axis vector that is normal to the plane of the ellipse.
•  x_radius—Specifies the radius of the ellipse in the direction of ‘x’ axis.
•  y_radius—Specifies the radius of the ellipse in the direction of ‘y’ axis. The ‘y’ axis can be found as a vector product of the plane_normal on x_axis.
•  start_ang—Specifies the starting angle (in radians) of the ellipse.
•  end_ang—Specifies the end angle (in radians) of the ellipse.
Use the function ProSplinedataInit() to initialize the spline data structure. The input arguments of this function are:
•  par_arr —Specifies an array of spline parameters
•  pnt_arr—Specifies an array of spline interpolant points
•  tan_arr—Specifies an array of tangent vectors at each point
•  num_points—Specifies the size for all the arrays
Use the function ProBsplinedataInit() to initialize the B-spline data structure. The input arguments of this function are:
•  degree—Specifies the degree of the basis function.
•  params —Specifies an array of knots on the parameter line.
•  weights —In the case of rational B-splines, it specifies an array of the same dimension as the array of c_pnts. Else, the value of this argument is NULL.
•  c_pnts—Specifies an array of knots on control points.
•  num_knots—Specifies the size of the params array.
•  num_c_points—Specifies the size of the c_pnts and the size of weights if it is not NULL.
Note
Although ProBsplinedataInit() returns B-spline curves, these curves are interpreted as spline curves in the ProIntData data structure used by the function ProImportfeatCreate() while creating the import feature.
The values PRO_TK_BSPL_UNSUITABLE_DEGREE and PRO_TK_BSPL_NON_STD_END_KNOTS returned by ProBsplinedataInit() should be treated as warnings. These values indicate that the geometry finally imported in Creo Parametric is different from the geometry initially supplied to the function. The geometry is not rejected by ProBsplinedataInit() and is used to generate the ProCurvedata data structure.
Appending the Edge Data to the Interface Data
Function Introduced:
Use the function ProIntfDataEdgeAppend() to append the edge data into the interface data.
Repeat the sequence for each edge required by the import feature.
Adding Quilts
Functions Introduced:
Use the function ProQuiltdataAlloc() to allocate memory to the quilt data structure.
Use the function ProQuiltdataInit() to assign the user defined identity to the quilt data structure. Specify a unique identity for the quilt as the input argument. The function returns the handle to the quilt data structure.
Use the function ProQuiltdataSurfArraySet() to define an array of surfaces as a quilt. The input arguments of this function are:
•  p_quilt_data—Specifies a handle to the quilt data to which we want to assign the set of surfaces.
•  arr_p_surf—Specifies an array of surfaces that will be defined as a quilt.
Use the function ProIntfDataQuiltAppend() to append the quilt data to the interface data. The input arguments of this function are:
•  p_intfdata —Specifies a handle to the interface data to which you want to append the quilt data.
•  p_quiltdata —Handle to the quilt data.
Repeat the sequence for each quilt required in the import feature.
Adding Datums
Functions Introduced:
Use the function ProDatumdataAlloc() to allocate memory to the datum data structure.
Initializing Datums
Use the function ProDatumdataInit() to initialize the datum data structure. The input arguments of this function are:
•  datum_id—Specifies a unique identifier of the datum.
•  datum_type—Specifies the datum type. The types of datums are:
  PRO_CSYS
  PRO_CURVE
  PRO_DATUM_PLANE
•  datum_name—Specifies the name to be assigned to the datum.
•  p_datum_ob j—The datum object that contains the geometrical information about the datum. Depending on the type of the datum to be created, one of the following functions must be used to create the ProDatumobject data structure.
  ProDatumCsysdataInit()
  ProDatumCurvedataInit()
  ProDatumPlanedataInit()
Note
The value PRO_TK_BSPL_MULTI_INNER_KNOTS returned by ProDatumCurvedataInit() should be treated as a warning. This value indicates that the geometry finally imported in Creo Parametric is different from the geometry initially supplied to the function. The geometry is not rejected by ProDatumCurvedataInit() and is used to generate the ProCurvedata data structure.
Use the function ProDatumdataMemoryFree() to free the top-level memory used by the datum data structure.
Appending the Datum Data to the Interface Data
Use the function ProIntfDataDatumAppend() to append the datum data to the interface data required to create the import feature. The input arguments are:
•  p_intfdata—Specifies the interface data to which the datum data must be appended.
•  p_datumdata —Specifies a handle to the datum data obtained from the function ProDatumdataInit().
•  Repeat the sequence for each datum member required to be in the import feature.
Creating Features from the Interface Data
Functions Introduced:
Use the function ProIntfDataSourceInit() to build the interface data source required by the functions ProImportfeatCreate() and ProImportfeatureWithProfileCreate(). The input arguments of this function are:
•  intf_type—Specifies the type of the interface. Since the user builds all the data required by the interface, the value should be PRO_INTF_NEUTRAL.
•  p_source—Specifies the handle to the interface data source.
The function returns the handle ProIntfDataSource, which must be passed to the functions ProImportfeatCreate() and ProImportfeatureWithProfileCreate().
Use the function ProImportfeatCreate() to create the import feature in the Creo Parametric solid model. The input arguments of this function are:
•  p_solid—Specifies the part or assembly in which the user wants to create the import feature.
•  data_source—Specifies a pointer to the interface data source. Use the function ProIntfDataSourceInit() to get the handle to the interface data source.
•  p_csys—Specifies the co-ordinate system of the part with which you want to align the import feature. If this is NULL, the function uses the default coordinate system in the Creo Parametric model and the import feature will be aligned with respect to that coordinate system.
•  p_attributes—Specifies the attributes for the creation of the new import feature. Refer to the section Import Feature Attributes for more information.
The function ProImportfeatCreate() returns the ProFeature handle for the created import feature.
If your Creo TOOLKIT application is built using Creo Parametric 6.0 and you have the function ProImportfeatCreate() in your application, then the same application works as it is in Creo Parametric 7.0.0.0.
Note
If you are planning to recompile your Creo TOOLKIT in Creo Parametric 7.0.0.0, you must set the default value of the enumerated data type body_use_opt to PRO_IMPORT_BODY_USE_DEFAULT, add_bodies to 0, and body_arr  to NULL otherwise the behavior of Creo Parametric may be unpredictable.
The function ProImportfeatureWithProfileCreate() is used to create a new import feature in the Creo Parametric solid model. This function takes the same input arguments as the function ProImportfeatCreate(), except for the argument profile that specifies the path to the import profile used. An import profile is an XML file with the extension .dip (Dex In Profile) and contains the options that control an import operation. It 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 function ProImportfeatureWithProfileCreate() cannot create an import feature using an import profile for the STL and VRML formats.
Use the function ProIntfDataFree() to release the memory occupied by the interface data.
Import Feature Attributes
Attributes define the action to be taken when creating the import feature. Following are the defined attributes:
•  attempt_make_solid—Specifies whether the import feature is to be created as a solid or a surface type. Set the value to 1 to create an import feature of solid type. Set it to 0 to create a surface type of import feature.
Note
If the import feature is an open surface, setting attempt_make_solid to 1 does not make the import feature of solid type.
•  cut_or_add—Specifies whether the solid type of import feature is to be created as a cut or a protrusion. This argument is valid only if attempt_make_solid is set to 1. Set the value to 1 to cut the solid import feature from the intersecting solid. Set it to 0 to create it as a protrusion.
Note
When attempt_make_solid is set to 0, the value assigned to cut_or_add is not considered.
•  join_surfaces—Specifies whether the import feature is created as a single quilt (joined surface) or separate surfaces (as it was in the original file) if it is of surface type. This argument is valid only if attempt_make_solid is set to 0. If the value is set to 1, all surfaces that can be joined are joined to form a single quilt.
•  add_bodies— Creates the same body structure as is present in the source file.
•  body_use_opt—Specifies the body options you can use while importing a feature and is defined by the enumerated data type ProImportBodyUseOpts. The valid values are as follows:
  PRO_IMPORT_BODY_USE_DEFAULT—Imports feature in the default body.
  PRO_IMPORT_BODY_USE_NEW—Imports feature in a new body.
  PRO_IMPORT_BODY_USE_ALL—Currently not supported.
  PRO_IMPORT_BODY_USE_SELECTED—Imports feature in a selected body.
•  body_arrProArray of bodies to be selected. By default, the size is 1. Set this value as NULL if you do not want to use any bodies in the import operation.
Redefining the Import Feature
Use the following functions in sequence to redefine the import feature.
Functions Introduced:
Use the function ProImportfeatRedefSourceInit() to initialize the redefine source. Currently Creo TOOLKIT users may
•  Redefine the attributes of any import feature.
Note
When redefining the attributes of the import feature, Creo Parametric will not use the value of the attribute join_surfaces, because this attribute is valid only for import feature creation.
•  Redefine the geometry of an import feature created from a geometric file. Import features created from memory may not be redefined.
The input arguments are:
•  operation—Specifies the type of operation to use when redefining the import feature.
•  p_source—Specifies the handle to the new interface data or the new attributes structure.
The function ProImportfeatRedefSourceInit() returns the handle to a structure, that is passed as an input argument to the function ProImportfeatRedefine().
Use the function ProImportfeatRedefine() to redefine the import feature. The input arguments are:
•  p_feat_handle—Specifies the handle for the import feature to be redefined.
•  p_source—The handle to be used for redefinition from the function ProImportfeatRedefSourceInit().
Note
ProImportfeatRedefine() does not support ATB-enabled features. It returns PRO_TK_BAD_CONTEXT while accessing such features.
Import Feature Properties
Functions Introduced:
Use the function ProImportfeatIdArrayCreate() to create an array of mappings between the user defined ids and the ids assigned by Creo Parametric to the entity items in the import feature.
Specify the handle to the feature, for which the user defined ids and ids assigned by Creo Parametric have to be mapped, as the input argument of the function. The function returns an array of mapped ids.
Use the function ProImportfeatIdArrayMapCount() to get the number of elements in the array of mappings. Use the function ProImportfeatIdArrayMapGet() to get the mapping of a particular element in the array.
Use the function ProImportfeatIdArrayFree() to free the array.
Use the function to ProImportfeatUserIdToItemId() to obtain the id or ids assigned by Creo Parametric for a user defined id. The function returns multiple ids in an array if the import operation split a particular entity.
For example, if you create a circular edge as a single edge data defined by a single id, Creo Parametric creates the circle by splitting it into two. If you pass the user defined id as an input to the function ProImportfeatUserIdToItemId(), the function will return an array of the ids assigned to each half of the circle.
The input arguments of this function are:
•  p_feat_handle—Specifies the handle of the import feature.
•  user_id—Specifies the identifier of the geometry item.
•  item_type—Specifies the type of the geometry item. The types of geometry are:
  PRO_SURFACE
  PRO_EDGE
  PRO_QUILT
Use the function ProImportfeatItemIdToUserId() to convert a Creo Parametric item id to an array of user defined ids.
For example, if the edges defined by the user are created as a single edge by Creo Parametric, and you pass a single item id assigned by Creo Parametric to the function ProImportfeatItemIdToUserId(), it will return an array of user ids.
•  p_feat_handle—Specifies the handle of the import feature.
•  item_id—Specifies the identifier of the geometry item.
•  item_type—Specifies the type of the geometry item. The types of geometry are:
  PRO_SURFACE
  PRO_EDGE
  PRO_QUILT
Use the function ProImportfeatDataGet() to retrieve the parameters assigned to the import feature. The output returned by this function will contains the following:
•  Information about the interface type of the import feature.
•  The filename from which the import feature is created. This is applicable for import features created from a file.
•  The coordinate system with respect to which the import feature is aligned.
•  The attributes of the import feature.
Extracting Creo Parametric Geometry as Interface Data
Functions Introduced:
Superseded Functions:
Use the function ProPartToProIntfData() to extract a ProIntfData structure describing the geometry of a part as if it were an import feature. This provides a single interface to extract all geometric data in order to convert it to another geometric format. The function ProPartToProIntfData() extracts the ProIntfData structure only if the model has a single body, else returns the error PRO_TK_MULTIBODY_UNSUPPORTED.
In Creo Parametric 7.0.0.0 and later, the function ProPartToProIntfData() has been deprecated. Use the function ProPartToProInterfaceData() to convert a ProPart structure to a ProIntfData structure. The input arguments follow:
•  ptk_part—The ProPart data structure that needs to be converted.
•  p_cnv_opts—The options for the conversion defined by the structure ProPartConversionOptions.
The interface data is returned by the output argument p_intfdata. You must preallocate the memory for this argument by calling the function ProIntfDataAlloc().
The functions ProIntfDataAccuracytypeGet(), ProIntfDataAccuracyGet(), and ProIntfDataOutlineGet() provide access to properties of the interface data structure.
The other functions allow you to count and access each individual geometric data structure in the interface data.
Associative Topology Bus Enabled Interfaces
The following interfaces are ATB-enabled by default:
•  CADDS 5
•  CATIA V4
•  CATIA V5
•  Creo Elements/Direct
•  Creo View
•  Creo Granite file
•  ICEM
•  Neutral
•  OPTEGRA
•  SolidWorks
•  NX
•  Inventor
You can indicate in the import profile to disable ATB. You can do this in the Import Profile Editor (under Tools  Utilities in the Creo Parametric user interface) by clearing the option Enable ATB.
Refer to the Creo Parametric Data Exchange Help for more information on profile editing and ATB (Associative Topology Bus).
Associative Topology Bus Enabled Models and Features
Associative Topology Bus (ATB) propagates changes made to the original CAD system data in the heterogeneous design environment. All geometric IDs preserved by the native system after the change to the native file are also preserved in the imported geometry by the ATB update. With ATB, you can work with Creo Parametric part or assembly that is:
•  A Translated Image Model (TIM) representation of a model imported from the ATB interface, such as, CADDS or CATIA.
•  A Creo Parametric assembly containing one or more components which are models imported from an ATB Interface, such as, CADDS or CATIA.
•  A Creo Parametric part containing an Import Feature that is imported from an ATB Interface such as, ICEM.
Only import operations in Creo Parametric create TIM parts and assemblies. You can open CATIA, CADDS model files as TIMs. Neutral part files and files of other ATB-enabled formats are imported as native Creo Parametric parts with ATB-enabled features.
The TIM parts and assemblies store their ATB information at the model level. However, ATB-enabled import features store ATB information at the feature-level. The TIMs are displayed in the Model Tree with ATB icons that indicate their status with respect to their reference file as up-to-date, out-of-date, and so on.
The functions related to ATB models or features are available in the header file ProATB.h. These functions enable you to perform the following actions on a TIM model or ATB-enabled feature or the entire geometry of the imported model:
•  Check the status of the TIMs or the ATB-enabled features.
•  Update TIMs or ATB-enabled features that are identified as out-of-date.
•  Change the link of a TIM or ATB-enabled feature.
•  Break the association between a TIM or the ATB-enabled feature and the original reference model.
Functions Introduced:
The function ProModelIsTIM() checks if the specified model is a TIM.
The function ProModelHasTIMFeature() checks if the specified model contains a TIM feature.
The function ProModelListTIMFeatures() lists all the TIMs or ATB-enabled features present in the specified model. This function can be called after the function ProModelHasTIMFeature() which determines if the specified model has one or more TIM features.
The function ProATBMdlnameVerify() verifies if the specified ATB model is out of date with the source CAD model. The function first checks if the specified model is a TIM. If the model is not a TIM, this function checks if the ATB-enabled model was created by importing or appending ICEM or neutral surfaces to existing Creo Parametric part models. The input arguments for this function are:
•  Model—Specify a Creo Parametric Part or Assembly that is—
  A Translated Image Model (TIM) representation of a model imported from the ATB interface, such as, CADDS or CATIA.
  A Creo Parametric assembly containing one or more components which are models imported from an ATB Interface, such as, CADDS or CATIA.
  A Creo Parametric part containing an Import Feature that is imported from an ATB Interface such as, ICEM.
•  feat_ids—Specify an array of feature ids for the ATB-enabled features in the model. If a model contains more than one ATB-enabled feature, the verify function works only on the specified feature. If you do not specify a feature id, the ProATBMdlnameVerify() function verifies the entire model including TIMs from non-native CAD models.
•  search_paths—Specify the complete location to the source CAD model. You can specify multiple directories to search for the model. If no search path is specified, then the function will search in current working directory or locations set in config-option atb_search_path.
The output arguments of this function represent the status of the TIMs and are as follows:
•  models_out_of_date—Specifies an array of TIMs or the ATB-enabled features that are out-of-date with the source model and require an update. These models are represented by a red icon in the Model Tree in the Creo Parametric user interface.
•  models_unlinked—Specifies an array of TIMs or the ATB-enabled features that have missing links because the reference model is missing from the designated search path. These models are represented by a yellow icon in the Model Tree in the Creo Parametric user interface.
•  models_old_version—Specifies an array of TIMs for which the source CAD model is older than the one with which the TIM was last updated. These models are represented by a yellow icon in the Model Tree in the Creo Parametric user interface. Use the function ProArrayFree() to free the array of output arguments.
The function ProATBMarkAsOutOfDate() identifies all the ATB-enabled features that are out of date for the update operation.
The function ProATBUpdate() updates only those ATB-enabled models or features that are displayed in the session. The update action synchronizes the derived structure and the contents of the TIMs with the primary structure and the content of the source non-native CAD models. This function returns an error if there are non-displayed models in the session or if the input model is not displayed.
Note
•  If the link of a TIM or ATB-enabled feature is broken, you cannot re-establish the link or update the part that is independent and has lost its association with the reference model.
•  The geometry added or removed from the model before the update is added or removed from the TIM after the update.
•  The geometry added or removed from the model before the update is added or removed from the TIM after the update.
•  ATB incorrectly identifies the imported geometry as up-to-date based on the old reference file which is found before the updated reference file.
The function ProATBRelink() relinks a TIM to a source CAD model specified by the input argument master_model_path. This function relinks all those models or features that have lost their association or link with their master model. In order to relink a model, provide the name and location of the master model, using the master_model_path to which the specified model or feature is to be linked. If the master model with the same name is found, the Creo Parametric TIM model is linked to that master model.