Deletes an independent detail, worksheet, layout, or master layout database.
GSErrCode ACAPI_Database ( APIDb_DeleteDatabaseID, API_DatabaseInfo* databaseInfo );
- [in] parameters of the database to be deleted
- The function has completed with success.
- no floor plan window opened
nullptr, or contains invalid database reference
- the passed
- attempted to delete database during signing in a Teamwork file
- unsufficient privileges to delete database in Teamwork mode
- failed to delete the database
For other common API errors see the API Errors document.
This function is used to delete an independent detail drawing, worksheet layout or master layout database. This operation is not undoable.
This function performs complete operations, so it cannot be called neither during undoable operations nor during non-undoable commands. See more details on this topic at Command Overview.
API_DatabaseInfo dbInfo; BNZeroMemory (&dbInfo, sizeof (API_DatabaseInfo)); GSErrCode err = ACAPI_Database (APIDb_GetCurrentDatabaseID, &dbInfo, nullptr); if (err == NoError && dbInfo.typeID == APIWind_LayoutID) ACAPI_Database (APIDb_DeleteDatabaseID, &dbInfo, nullptr);
- Version: API 6.1 or later
- Header: APIdefs_Database.h
APIDb_NewDatabaseID, APIDb_ModifyDatabaseID, APIDb_GetDatabaseInfoID
ACAPI_Database, API Functions