Sets the value of an autotext.
GSErrCode ACAPI_Goodies ( APIAny_SetAnAutoTextID, const GS::UniString* autotextDbKey, const GS::UniString* autotextValue );
Parameters
- autotextDbKey
- [in] The database key of autotext to be changed
- autotextValue
- [in] The new autotext value for the specified key (optional, can be
nullptr
)
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
- The passed
autotextDbKey
parameter isnullptr
. APIERR_BADVALUE
- The passed autotext value is not valid.
For other common API errors see the API Errors document.
Remarks
Use this function to set the value of an existing autotext defined by the given autotext key. You can set the autotext value empty by passing nullptr
in the autotextValue
parameter.
You can get the list of currently available autotexts with the APIAny_GetAutoTextsID and APIAny_GetAutoTextKeysID functions.
This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.
Example
GS::UniString dbKey ("COMPANY"); GS::UniString value ("GRAPHISOFT SE"); GSErrCode err = ACAPI_Goodies (APIAny_SetAnAutoTextID, &dbKey, &value);
Requirements
- Version: API 10 or later
- Header: APIdefs_Goodies.h
See Also
APIAny_GetAutoTextsID
APIAny_GetAutoTextKeysID
ACAPI_Goodies
API Functions