ACAPI_​TeamworkControl_​ReserveElements

Reserves elements in Teamwork mode.

    GSErrCode  ACAPI_TeamworkControl_ReserveElements (
        const GS::PagedArray<API_Guid>&      objectIdArray,
        GS::HashTable<API_Guid, short>*      conflicts = nullptr
    );

 

Parameters

objectIdArray
[in] List of elements to be reserved.
conflicts
[out] List of elements which cannot be reserved (optional, can be nullptr).

 

Return Values

NoError
The function has completed with success.

For other common errors see the list of error codes.

 

Remarks

This function attempts to reserve the elements specified with the guid list.

If the conflicts parameter is given, the function returns the list of unsuccessful reservations with the userId of the conflicting team members.

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

 

Example


GS::PagedArray<API_Guid>        objectIdArray;
GS::HashTable<API_Guid, short>  conflicts;

objectIdArray.Push (elementToReserve.header.guid);

ACAPI_TeamworkControl_ReserveElements (objectIdArray, &conflicts);
if (conflicts.IsEmpty ())
    ACAPI_WriteReport ("The element has been reserved successfully", true);

 

Requirements

Version: API 13 or later
Header: ACAPinc.h

 

See Also

ACAPI_TeamworkControl_ReleaseElements
ACAPI_Notify_CatchElementReservationChange
Teamwork Control
API Functions