Category Creo Parametric fundamentals, Object ProModelitem

Function ProModelitemNameSet


Description
Sets or resets the name of the model item.

The valid types (p_item->type) are as follows:

If you pass any other type, the function returns PRO_TK_BAD_INPUTS.

Replacement in Object TOOLKIT: pfcModelItem::SetName
Synopsis
#include <ProModelitem.h>
ProErrorProModelitemNameSet(
ProModelitem* p_item
/* (In)
The model item
*/
ProName name
/* (In)
The name to set
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully set the name.
PRO_TK_BAD_INPUTSOne or more of the arguments are invalid.
PRO_TK_LINE_TOO_LONGThe string passed has exceeded the maximum size, that is, PRO_NAME_SIZE.
PRO_TK_INVALID_NAMEThe name specified is not a valid name for a model item in Creo Parametric.
PRO_TK_E_FOUNDThe name specified is already in use in the model.

Manual References:

  1. Pro/DEVELOP to Creo Toolkit Function Mapping: Equivalent Pro/DEVELOP Functions
  2. Core: 3D Geometry: Geometry Objects
  3. Core: Models and Model Items: Model Items
  4. Core: Models and Model Items: Model Items
  5. Core: Models and Model Items: Example 2: Renaming a Selected Surface
  6. Annotations: Annotation Features and Annotations: The ProDimension Object
  7. Annotations: Annotation Features and Annotations: Notes
  8. Technical Summary of Changes for Creo 11.0.0.0: Updates to Error Types

Sample Code References:

  1. pt_examples ( TestMisc.c )
  2. pt_examples ( TestRelation.c )
  3. pt_examples ( TestSetup.c )
  4. pt_geardesign ( GearDesign.c )
  5. pt_geardesign ( GearDesignUtils.c )
  6. pt_udf_examples ( PTUDFExUDFPlacementDashboard.c )
  7. pt_userguide ( UgImportfeatCreate.c )
  8. pt_userguide ( UgGeomSurfArea.c )
  9. pt_userguide ( UgGeomSurfRename.c )