Category 2D interface, Object Pro2dImport

Function Pro2dImportMdlnameCreate


Description
Creates a new 2d Creo Parametric model by importing a 2d geometry file. Note: In Creo 3 this function does not support names longer than 31 characters. It will return PRO_TK_BAD_INPUTS for longer names. The support for ProMdlName will be added in a future release.
Synopsis
#include <ProUtil.h>
ProErrorPro2dImportMdlnameCreate(
ProImportExportFile format
/* (In)
The type of file to be imported. The following values are supported: Note: To import the 2d MEDUSA file set the config option "allow_medusa_draw_import" to yes.
*/
ProPath filename
/* (In)
The name (absolute path or relative path) of the file to be imported. The name of the MEDUSA files must have the format s.objectname.
*/
ProMdlName name
/* (In)
The name of the model to be created.
*/
ProMdlType mtype
/* (In)
The type of model to create. Must be PRO_MDL_DRAWING, PRO_MDL_LAYOUT, PRO_MDL_DIAGRAM or PRO_MDL_DWGFORM.
*/
ProBoolean import_2d_views
/* (In)
Whether to import 2d drawing views.
*/
ProBoolean scale_to_fit
/* (In)
If the current model has a different sheet size from that specified by the imported file, scale_to_fit should be TRUE to retain the current sheet size, or FALSE to adopt the new one.
*/
ProBoolean fit_left_corner
/* (In)
If the imported file retain its original sheet size, the bottom left corner of the file will be adjusted to the bottom left corner of the current model for PRO_B_TRUE, and imported "as is" for PRO_B_FALSE.
*/
ProMdl* new_model
/* (Out)
The new model that Creo Parametric created.
*/
)
Returns
PRO_TK_NO_ERRORImported file appended successfuly to the current model.
PRO_TK_BAD_INPUTSIllegal model type or import file type.
PRO_TK_INVALID_FILEThe input file could not be found, or contained unrecoverable errors.
PRO_TK_NO_LICENSEThere is no license for this import option.
PRO_TK_CANT_OPENFailed to create drawing. PRO_TK_OBSOLETE_FUNC- The file format selected is no longer supported on this platform.
PRO_TK_INVALID_NAMELength of the new model name is more than 31 chars.

Manual References:

  1. Working with Multi-CAD Models Using Creo Unite: Functions that Support Multi-CAD Assemblies
  2. Working with Multi-CAD Models Using Creo Unite: Superseded Functions
  3. Working with Multi-CAD Models Using Creo Unite: Restrictions on Character Length for Multi-CAD Functions
  4. Interface: Data Exchange: Importing 2D Models
  5. Interface: Data Exchange: Importing 2D Models
  6. Interface: Data Exchange: Importing 2D Models