ACAPI_​TeamworkControl_​ReleaseLockable

Releases a lockable object set in Teamwork mode.

    GSErrCode  ACAPI_TeamworkControl_ReleaseLockable (
        const API_Guid&     objectId,
        bool                enableDialogs = true
    );

 

Parameters

objectId
[in] Unique identifier of the lockable object set
enableDialogs API version 22
[in] Show dialogs during the process?

 

Return Values

NoError
The function has completed with success.
APIERR_NOPLAN
There is no open project.
APIERR_NOTEAMWORKPROJECT
The current project is not Teamwork project.
APIERR_BADID
The given objectId is not a valid lockable object set identifier.
APIERR_SERVICEFAILED
The object set cannot be unlocked, or the operation has failed due to communication or server error.

For other common errors see the list of error codes.

 

Remarks

This function is used to release a lockable object set previously reserved by the current user.

The modifications to the object set are sent to the server project right before the server actually unlocks the objects.

This function is a non-undoable data structure modifier function. See more details on this topic at Command Overview.

 

Example


API_Guid objectSetGuid = ACAPI_TeamworkControl_FindLockableObjectSet ("LayerSettingsDialog");
API_LockableStatus lockableStatus = ACAPI_TeamworkControl_GetLockableStatus (objectSetGuid, nullptr);

if (lockableStatus == APILockableStatus_Editable) {
    GSErrCode errCode = ACAPI_TeamworkControl_ReleaseLockable (objectSetGuid);
    if (errCode == NoError)
        ACAPI_WriteReport ("Layer Settings has been released succesfully", true);
    else
        ACAPI_WriteReport ("Releasing Layer Settings has failed", true);
} else {
    ACAPI_WriteReport ("Layer Settings was not reserved", true);
}

 

Requirements

Version: API 13 or later
Header: ACAPinc.h

 

See Also

ACAPI_TeamworkControl_GetLockableStatus
ACAPI_TeamworkControl_FindLockableObjectSet
ACAPI_TeamworkControl_ReserveLockable
ACAPI_Notify_CatchLockableReservationChange
Teamwork Control
API Functions