Deletes a custom entry from the Project Info.
GSErrCode ACAPI_Goodies ( APIAny_DeleteAnAutoTextID, const char* dbKey );
Parameters
- dbKey
- [in] The identifier of the autotext (stored in the database).
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
- The
dbKey
parameter isnullptr
oruiKey
already exists. APIERR_BADID
- The given autotext doesn’t exist.
For other common API errors see the API Errors document.
Remarks
This function is used to delete a custom entry from the Project Info.
This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.
Example
bool DeleteLastAutotext (void) { GS::Array<GS::ArrayFB<GS::UniString, 3> > autoTexts; API_AutotextType type = APIAutoText_Custom; GSErrCode err = ACAPI_Goodies (APIAny_GetAutoTextsID, &autoTexts, (void *) (Int32) type); if (err == NoError && !autoTexts.IsEmpty ()) { // delete last custom entry const GS::UniString& dbKey = autoTexts[autoTexts.GetSize () - 1][1]; err = ACAPI_Goodies (APIAny_DeleteAnAutoTextID, (void*)((const char*) dbKey.ToCStr ()), nullptr); if (err != NoError) DBPrintf ("APIAny_DeleteAnAutoTextID function failed."); } }
Requirements
- Version: API 12 or later
- Header: APIdefs_Goodies.h