Category Creo Parametric user interface, Object ProMessage

Function ProMessageIntegerRead


Description
Reads an integer from the keyboard. If the user types an invalid string, or a value outside the range of values, the function asks the user to enter the value again. Specify default values in the call to ProMessageDisplay(), using the separator ||| in the format string in the message file. (See the Creo Parametric TOOLKIT User's Guide section Contents of the Message File for the specific placement of the ||| separator.)

NOTE:Call ProMessageDisplay before calling this function.

Replacement in Object TOOLKIT: pfcSession::UIReadIntMessage
Synopsis
#include <ProMessage.h>
ProErrorProMessageIntegerRead(
int range[2]
/* (In)
The lower and upper bounds allowed for the input. If this is NULL, any values are acceptable.
*/
int* answer
/* (Out)
The user's input.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully read an integer.
PRO_TK_MSG_USER_QUITThe user canceled input by typing <ESC>.
PRO_TK_GENERAL_ERRORThe function failed to read an integer.

Manual References:

  1. Pro/DEVELOP to Creo Toolkit Function Mapping: Equivalent Pro/DEVELOP Functions
  2. User Interface: Messages: Text Message File Format and Restrictions
  3. User Interface: Messages: Getting Keyboard Input

Sample Code References:

  1. pt_examples ( TestAsm.c )
  2. pt_examples ( TestProcstep.c )
  3. pt_examples ( TestFamTab.c )
  4. pt_examples ( TestFeats.c )
  5. pt_examples ( TestPatternCreate.c )
  6. pt_examples ( TestPatternCreate.c )
  7. pt_examples ( TestPatternCreate.c )
  8. pt_examples ( TestGenedata.c )
  9. pt_examples ( TestGenedata.c )
  10. pt_examples ( TestDisplist.c )
  11. pt_examples ( TestDisplist.c )
  12. pt_examples ( TestDisplist.c )
  13. pt_examples ( TestDisplist.c )
  14. pt_examples ( TestDisplist.c )
  15. pt_examples ( TestDisplist.c )
  16. pt_examples ( TestDrwSheets.c )
  17. pt_examples ( TestMessage.c )
  18. pt_examples ( UtilMessage.c )
  19. pt_userguide ( UgAnimAsmcompAnim.c )
  20. pt_userguide ( UgNotesColor.c )
  21. pt_userguide ( UgSheetDelete.c )
  22. pt_userguide ( UgTableColorChange.c )
  23. pt_userguide ( UgMessageWindowUse.c )
  24. pt_userguide ( UgMessageWindowUse.c )
  25. pt_userguide ( UgModelLayerScan.c )
  26. pt_userguide ( UgXsecMassProps.c )