Category Creo Parametric fundamentals, Object ProFile

Function ProFileMdlnameParse


Description
Parses the specified file name into its components. Note: In Creo 3 this function does not support names longer than 80 characters. It will return PRO_TK_BAD_INPUTS for longer names. This API is not supported for fetching the model version of windchill model(if directory path is winchill path). The support for ProMdlName will be added in a future release.
Replacement in Object TOOLKIT: wfcWSession::ParseFileName
Synopsis
#include <ProUtil.h>
ProErrorProFileMdlnameParse(
ProPath file_name_w_path
/* (In)
The full file name, composed of the path, name, extension, and version.
*/
ProPath r_path
/* (Out)
The directory path. This argument is optional (can be NULL).
*/
ProMdlName r_file_name
/* (Out)
The file name. This argument is optional (can be NULL).
*/
ProMdlExtension r_extension
/* (Out)
The file extension. This argument is optional (can be NULL).
*/
int * r_version
/* (Out)
The file version. This argument is optional (can be NULL).
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully parsed the file name.
PRO_TK_BAD_INPUTSThe specified file name was invalid.

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. Core: Utilities: File Handling
  5. Core: Utilities: File Handling

Sample Code References:

  1. pt_examples ( TestAsm.c )
  2. pt_examples ( TestMultiCADFile.c )
  3. pt_examples ( TestDbms.c )
  4. pt_examples ( TestDbms.c )
  5. pt_examples ( TestDbms.c )
  6. pt_examples ( TestDrawTbl.c )
  7. pt_examples ( TestDrwSheets.c )
  8. pt_examples ( TestDrwView.c )
  9. pt_examples ( TestSymDefMenu.c )
  10. pt_examples ( TestCavityLayout.c )
  11. pt_udf_examples ( PTUDFExUDFPlacementDashboard.c )
  12. pt_userguide ( UgAsmcompConstraint.c )
  13. pt_userguide ( UgDrawingViews.c )
  14. pt_userguide ( UgFundStringConv.c )
  15. pt_userguide ( UgMaterial.c )
  16. pt_userguide ( UgFileEdit.c )
  17. pt_userguide ( UgFileEdit.c )
  18. pt_wc_server ( PTWCServerPopulate.c )