Documentação da API > 2D interface > Object Pro2dImport > Function Pro2dImportMdlnameCreate
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.
Replacement in Object TOOLKIT:
Synopsis
#include <ProUtil.h>
Pro2dImportMdlnameCreate
(
/* (In)
The type of file to be imported. The following values are supported: PRO_STEP_FILE PRO_IGES_FILE PRO_DXF_FILE PRO_DWG_FILE PRO_CGM_FILE PRO_MEDUSA_FILE PRO_CCD_DRAWING_FILE 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.
*/
/* (In)
The name of the model to be created.
*/
/* (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
Imported file appended successfuly to the current model.
Illegal model type or import file type.
The input file could not be found, or contained unrecoverable errors.
There is no license for this import option.
Failed to create drawing. PRO_TK_OBSOLETE_FUNC- The file format selected is no longer supported on this platform.
Length of the new model name is more than 31 chars.
User Guide References
Isto foi útil?