C++
ACCORE_PORT int acedGetString( int cronly, const ACHAR * prompt, AcString & sResult );
File
acedads.h
Description
Gets user input for a string.
The AutoCAD user can enter the string from the keyboard. If the user enters more than 133 characters, string entry continues until the user enters a blank or [Return] (according to cronly), but acedGetString() places only the first 133 characters into result.
acedGetString() uses the value of the TEXTEVAL system variable to determine whether or not to evaluate AutoLISP expressions in the user's input. If TEXTEVAL is 1, input starting with an opening parenthesis ('(') or an exclamation mark ('!') is evaluated as an AutoLISP expression; while if TEXTEVAL is 0, all text strings and attribute values are taken literally.
The acedGetString() function returns one of the following: RTNORM if it succeeds, RTERROR if it fails, or RTCAN if the user cancels the request by pressing [ESC]. It returns RTMODELESS, if the active command was registered using the ACRX_CMD_INTERRUPTIBLE flag and the document has received a modeless interrupt signal from a call to AcApDocManager::sendModelessInterrupt().
Parameters
Parameters | Description |
---|---|
cronly | If nonzero, the string can contain blanks and the user must terminate it by entering [Return]; if zero, entering either a blank or [Return] terminates the string |
prompt | Optional prompt string that acedGetString() displays before it pauses; for no prompt, pass a NULL pointer |
sResult | Output value of the user entered string |