Functions exposing the Teamwork functionality of Archicad, including Teamwork project and connection management, rights and permissions management and release/reserve functionalities.
More...
|
GSErrCode | ACAPI_Teamwork_GetTWOwner (API_DatabaseUnId *databaseUnId, short *userId) |
| Retrieves the TeamWork owner of a given database.
|
|
GSErrCode | ACAPI_Teamwork_ProjectSharing (API_SharingInfo *sharingInfo) |
| Returns the project sharing data in the case of a TeamWork project.
|
|
GSErrCode | ACAPI_Teamwork_GetTWAccessRight (API_TWAccessRights accessRight, bool *hasRight) |
| Returns if the current user has the specifed access right.
|
|
GSErrCode | ACAPI_Teamwork_GrantElements (const GS::Array< API_Guid > &elemGuids, short toUserId) |
| In teamwork mode this function grants the specified elements to the given user.
|
|
bool | ACAPI_Teamwork_HasConnection (void) |
| Tells whether the currently opened project is a Teamwork project.
|
|
bool | ACAPI_Teamwork_IsOnline (void) |
| Tells whether the client is online connected to the BIM server.
|
|
bool | ACAPI_Teamwork_IsServerLibPart (const IO::Location &location) |
| Tells whether the given location refers to a BIM Server Library Part.
|
|
GSErrCode | ACAPI_Teamwork_GetTeamworkProjectDetails (const IO::Location &twProjectLocation, GS::UniString *serverUrl=nullptr, GS::UniString *projectName=nullptr, GS::UniString *userName=nullptr) |
| Extracts details from the given location about the teamwork project.
|
|
bool | ACAPI_Teamwork_HasCreateRight (const API_Guid &objectId) |
| Checks whether the current Teamwork user has access right to create a certain type of object.
|
|
bool | ACAPI_Teamwork_HasDeleteModifyRight (const API_Guid &objectId) |
| Checks whether the current Teamwork user has access right to delete or modify a certain type of object.
|
|
API_LockableStatus | ACAPI_Teamwork_GetLockableStatus (const API_Guid &objectId, GS::PagedArray< short > *conflicts=nullptr) |
| Retrieves the reservation status of a lockable object set.
|
|
API_Guid | ACAPI_Teamwork_FindLockableObjectSet (const GS::UniString &objectSetName) |
| Retrieves the unique identifier of a lockable object set with a string identifier.
|
|
GSErrCode | ACAPI_Teamwork_ReserveLockable (const API_Guid &objectId, GS::PagedArray< short > *conflicts=nullptr, bool enableDialogs=true) |
| Reserves a lockable object set in Teamwork mode.
|
|
GSErrCode | ACAPI_Teamwork_ReleaseLockable (const API_Guid &objectId, bool enableDialogs=true) |
| Releases a lockable object set in Teamwork mode.
|
|
GSErrCode | ACAPI_Teamwork_ReserveElements (const GS::Array< API_Guid > &elements, GS::HashTable< API_Guid, short > *conflicts=nullptr, bool enableDialogs=true) |
| Reserves elements in Teamwork mode.
|
|
GSErrCode | ACAPI_Teamwork_ReleaseElements (const GS::Array< API_Guid > &elements, bool enableDialogs=true) |
| Releases elements in Teamwork mode.
|
|
GSErrCode | ACAPI_Teamwork_ReserveHotlinkCacheManagement (short *conflict=nullptr) |
| Reserves the Hotlink/XRef Management in Teamwork mode.
|
|
GSErrCode | ACAPI_Teamwork_ReleaseHotlinkCacheManagement (void) |
| Releases the Hotlink/XRef Management in Teamwork mode.
|
|
GSErrCode | ACAPI_Teamwork_GetHotlinkCacheManagementOwner (short *owner) |
| Provides the current owner of the Hotlink/XRef Management in Teamwork mode.
|
|
GSErrCode | ACAPI_Teamwork_GetUsernameFromId (short userId, GS::UniString *username) |
| Retrieves the username of a user identified by a short id in a Teamwork project.
|
|
GSErrCode | ACAPI_Teamwork_SendChanges (const GS::UniString &comment=GS::EmptyUniString) |
| Sends changes to the BIMcloud server.
|
|
GSErrCode | ACAPI_Teamwork_ReceiveChanges () |
| Receives changes from the BIMcloud server.
|
|
GSErrCode | ACAPI_RegisterTeamworkReserveInterface (const API_Guid &objectId, short dialogId, short tabId, short tabResId, GSResModule resModule, GSResModule dialogIconResModule, APIReservationTeamWorkPanelParentUIRefreshNeededProc *teamworkPanelParentUIRefreshNeeded, APIReservationTeamWorkPanelParentDataSaveNeededProc *teamworkPanelParentDataSaveNeeded, const GS::UniString &requestMessage, API_TWAccessRights createRight=APINoPermission, API_TWAccessRights deleteModifyRight=APINoPermission) |
| Registers an interface supporting reserve/release in teamwork operations.
|
|
GSErrCode | ACAPI_UnregisterTeamworkReserveInterface (const API_Guid &objectId, short dialogId=0) |
| Unregisters a previously registered interface.
|
|
GSErrCode | ACAPI_RefreshTeamworkReserveInterface (const API_Guid &objectId, short dialogId, bool isTeamWorkPanelParentUIRefreshNeeded=false) |
| Refreshes the registered teamwork interface.
|
|
GSErrCode | ACAPI_Teamwork_SendReleaseCommentMail (const API_Guid &objectId, short dialogId) |
| Sends the release comment mail.
|
|
Functions exposing the Teamwork functionality of Archicad, including Teamwork project and connection management, rights and permissions management and release/reserve functionalities.
Teamwork Control
This bunch of functions lets your add-on operate in the new Teamwork environment introduced in Archicad 13.
Functions
for checking the project status and the online-offline mode:
for checking the user privileges of lockable object sets:
for lockable object set reservation:
for element reservation:
for reservation of the Hotlink/XRef Management
for monitoring reservation changes:
for determining if a given library part is loaded from the BIM server:
for collecting information about the team project, the actual workspace and the effective privileges of the Team Member:
for sending or receiving changes to or from the BIM server:
Lockable Object Sets
Lockable object sets are groups of objects (or may consist of a single object) which can be modified separately from the other part of the Teamwork project. Typically attribute containers are lockable object sets. These sets have a special reservation panel on their settings dialog in Teamwork mode to control the exclusive lock on that particular part of the project.
On the API interface lockable object sets are referenced by their object guid. These guids can be obtained with the ACAPI_Teamwork_FindLockableObjectSet function using pre-defined identifiers.
In some cases two or more lockable object sets need to be handled simultaneously, for example they can be locked only in the same user interface at the same time, like the Layers and Layer Combinations in the Layer Settings dialog. These sets are grouped under a special lockable object set, which is called compound lockable object set. Compounds are referenced by a pre-defined name, and their guid can also be retrieved by the ACAPI_Teamwork_FindLockableObjectSet function.
The pre-defined identifier strings of lockable object sets are listed in the Remarks section of ACAPI_Teamwork_FindLockableObjectSet.
Example
The Teamwork_Control example project of the APIDevKit shows samples how to use these functions.
◆ ACAPI_RefreshTeamworkReserveInterface()
GSErrCode ACAPI_RefreshTeamworkReserveInterface |
( |
const API_Guid & |
objectId, |
|
|
short |
dialogId, |
|
|
bool |
isTeamWorkPanelParentUIRefreshNeeded = false |
|
) |
| |
Refreshes the registered teamwork interface.
- Parameters
-
objectId | [in] The unique identifier of this interface (that you passed during registration). |
dialogId | [in] The dialog ID you registered the interface for. |
isTeamWorkPanelParentUIRefreshNeeded | [in] Update the parent UI as well? |
- Returns
- NoError - The function completed with success.
◆ ACAPI_RegisterTeamworkReserveInterface()
GSErrCode ACAPI_RegisterTeamworkReserveInterface |
( |
const API_Guid & |
objectId, |
|
|
short |
dialogId, |
|
|
short |
tabId, |
|
|
short |
tabResId, |
|
|
GSResModule |
resModule, |
|
|
GSResModule |
dialogIconResModule, |
|
|
APIReservationTeamWorkPanelParentUIRefreshNeededProc * |
teamworkPanelParentUIRefreshNeeded, |
|
|
APIReservationTeamWorkPanelParentDataSaveNeededProc * |
teamworkPanelParentDataSaveNeeded, |
|
|
const GS::UniString & |
requestMessage, |
|
|
API_TWAccessRights |
createRight = APINoPermission , |
|
|
API_TWAccessRights |
deleteModifyRight = APINoPermission |
|
) |
| |
Registers an interface supporting reserve/release in teamwork operations.
- Parameters
-
objectId | [in] The unique identifier of this interface. |
dialogId | [in] The dialog ID you register the interface for. |
tabId | [in] The tab page ID you register the interface for. |
tabResId | [in] The resource describing the tab page interface elements. |
resModule | [in] The resource module identifier that identifies the module containing the tab page interface elements. |
dialogIconResModule | [in] The resource module identifier that identifies the module containing the tab page icons. |
teamworkPanelParentUIRefreshNeeded | [in] The callback function which is called when you have to refresh the items on the registered interface. |
teamworkPanelParentDataSaveNeeded | [in] The callback function which is called before your panel is closed. You can use this function to set an internal state in your add-on which you can use later to perform teamwork-related operations (e.g., reserve or release AddOnObjects). |
requestMessage | [in] The request message. |
createRight | [in] The teamwork create right you assign to this interface. |
deleteModifyRight | [in] The teamwork delete and modify right you assign to this interface. |
- Returns
- NoError - The function completed with success.
- APIERR_BADPARS -
objectId
is APINULLGuid
or dialogId
is 0 or tabId
is 0.
- APIERR_NOPLAN - No project is open.
- APIERR_NOTEAMWORKPROJECT - The open project is not a teamwork project.
- APIERR_BADID -
objectId
is APINULLGuid
.
◆ ACAPI_Teamwork_FindLockableObjectSet()
API_Guid ACAPI_Teamwork_FindLockableObjectSet |
( |
const GS::UniString & |
objectSetName | ) |
|
Retrieves the unique identifier of a lockable object set with a string identifier.
- Since
- Archicad 25
- Parameters
-
objectSetName | [in] String identifier of the lockable object set (see below) |
- Returns
- NoError - The function returns the Guid of the named lockable object set if found by the given objectSetName string, otherwise it returns APINULLGuid.
- Example
.
GSErrCode ACAPI_Teamwork_ReleaseLockable(const API_Guid &objectId, bool enableDialogs=true)
Releases a lockable object set in Teamwork mode.
◆ ACAPI_Teamwork_GetHotlinkCacheManagementOwner()
GSErrCode ACAPI_Teamwork_GetHotlinkCacheManagementOwner |
( |
short * |
owner | ) |
|
Provides the current owner of the Hotlink/XRef Management in Teamwork mode.
- Parameters
-
owner | [out] userId of the current owner if there is any (must not be nullptr). |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - The given parameter is nullptr.
- APIERR_NOPLAN - There is no open project.
- APIERR_NOTEAMWORKPROJECT - The current project is not a Teamwork project.
- Example
short owner;
GSErrCode err = ACAPI_GetHotlinkCacheManagementOwner (&owner);
if (err == NoError) {
ACAPI_Environment (APIEnv_ProjectID, &projectInfo);
if (projectInfo.
userId == owner)
ACAPI_WriteReport (
"The Hotlink/XRef Management is being reserved by this client.",
true);
}
void ACAPI_WriteReport(const GS::UniString &format, bool withDial,...)
Writes a report string into the Report Windowot into a custom alert window.
Contains information about the current project.
Definition: APIdefs_Environment.h:230
short userId
team project member ID; if signed into a team project.
Definition: APIdefs_Environment.h:248
◆ ACAPI_Teamwork_GetLockableStatus()
Retrieves the reservation status of a lockable object set.
- Since
- Archicad 25
- Parameters
-
objectId | [in] Unique identifier of the lockable object set |
conflicts | [out] List of conflicting users (optional, can be nullptr or omitted) |
- Returns
APILockableStatus_NotExist
- No Teamwork connection, or the passed objectId parameter does not identifies a valid lockable object set
APILockableStatus_Free
- The given lockable object set is available for reservation, not locked
APILockableStatus_Editable
- The given lockable object set is editable, already reserved by the current user
APILockableStatus_Locked
- The given lockable object set is reserved by someone else
APILockableStatus_NotAvailable
- Server is offline or not available
- Example
functions.
GSErrCode ACAPI_Teamwork_ReserveLockable(const API_Guid &objectId, GS::PagedArray< short > *conflicts=nullptr, bool enableDialogs=true)
Reserves a lockable object set in Teamwork mode.
◆ ACAPI_Teamwork_GetTeamworkProjectDetails()
GSErrCode ACAPI_Teamwork_GetTeamworkProjectDetails |
( |
const IO::Location & |
twProjectLocation, |
|
|
GS::UniString * |
serverUrl = nullptr , |
|
|
GS::UniString * |
projectName = nullptr , |
|
|
GS::UniString * |
userName = nullptr |
|
) |
| |
Extracts details from the given location about the teamwork project.
- Since
- Archicad 25
- Parameters
-
twProjectLocation | [in] The location URI of the teamwork project. |
serverUrl | [out] The URL of the teamwork (BIMcloud) server. |
projectName | [out] The name of the project on the server. |
userName | [out] The username of the logged in user. |
- Returns
- NoError - The function has completed with success.
- APIERR_NOTEAMWORKPROJECT - The given project is not Teamwork project.
- Example
GS::UniString serverUrl;
GS::UniString projectName;
GS::UniString userName;
&serverUrl,
&projectName,
&userName);
if (err != NoError) {
ACAPI_WriteReport (
"The given location does not refer to a teamwork project.",
true);
}
GSErrCode ACAPI_Teamwork_GetTeamworkProjectDetails(const IO::Location &twProjectLocation, GS::UniString *serverUrl=nullptr, GS::UniString *projectName=nullptr, GS::UniString *userName=nullptr)
Extracts details from the given location about the teamwork project.
◆ ACAPI_Teamwork_GetTWAccessRight()
GSErrCode ACAPI_Teamwork_GetTWAccessRight |
( |
API_TWAccessRights |
accessRight, |
|
|
bool * |
hasRight |
|
) |
| |
Returns if the current user has the specifed access right.
- Parameters
-
accessRight | [in] The access right to check. |
hasRight | [out] The status of the access right in question. |
- Returns
- NoError - The function completed with success.
- APIERR_BADPARS - hasRight is nullptr
◆ ACAPI_Teamwork_GetTWOwner()
GSErrCode ACAPI_Teamwork_GetTWOwner |
( |
API_DatabaseUnId * |
databaseUnId, |
|
|
short * |
userId |
|
) |
| |
Retrieves the TeamWork owner of a given database.
- Parameters
-
databaseUnId | [in] The unique ID of the database |
userId | [out] The TeamWork user ID of the owner of the specified database |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - The dbUnID or the userId parameter is nullptr, or dbUnID is not valid
- Example
short userId = 0;
ACAPI_Database (APIDb_GetCurrentDatabaseID, &databaseInfo, nullptr);
if (ACAPI_Database (APIDb_GetTWOwnerID, &(databaseInfo.
databaseUnId), &userId) == NoError)
DBPrintf ("TeamWork owner ID of the current database: %d\n", userId);
Identification parameters of a project window.
Definition: APIdefs_Database.h:274
API_DatabaseUnId databaseUnId
Section/Elevation/Interior Elevation, Detail and Worksheet database/window unique identifier.
Definition: APIdefs_Database.h:291
◆ ACAPI_Teamwork_GetUsernameFromId()
GSErrCode ACAPI_Teamwork_GetUsernameFromId |
( |
short |
userId, |
|
|
GS::UniString * |
username |
|
) |
| |
Retrieves the username of a user identified by a short id in a Teamwork project.
- Since
- Archicad 25
- Parameters
-
userId | [in] Unique identifier of the user |
username | [out] The name of the user |
- Returns
- NoError - The function has completed with success.
- APIERR_NOPLAN - There is no open project.
- APIERR_NOTEAMWORKPROJECT - The current project is not Teamwork project.
- Example
The Teamwork_Control
example project of the DevKit shows samples how to use this function.
◆ ACAPI_Teamwork_GrantElements()
GSErrCode ACAPI_Teamwork_GrantElements |
( |
const GS::Array< API_Guid > & |
elemGuids, |
|
|
short |
toUserId |
|
) |
| |
In teamwork mode this function grants the specified elements to the given user.
- Parameters
-
elemGuids | [in] The list of the elements which must be granted. |
toUserId | [in] The teamwork owner, to which the objects must be granted. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - The passed parameter elemGuids is empty, contains APINULLGuid, or not all the elements are on the same floor.
- APIERR_BADID - If any of the elemGuids is not an AddOnObject GUID.
◆ ACAPI_Teamwork_HasConnection()
bool ACAPI_Teamwork_HasConnection |
( |
void |
| ) |
|
Tells whether the currently opened project is a Teamwork project.
- Returns
- true - The current project is a shared Teamwork project.
- false - The current project is a solo project, or there is no open project at all.
- Example
bool ACAPI_Teamwork_HasConnection(void)
Tells whether the currently opened project is a Teamwork project.
◆ ACAPI_Teamwork_HasCreateRight()
bool ACAPI_Teamwork_HasCreateRight |
( |
const API_Guid & |
objectId | ) |
|
Checks whether the current Teamwork user has access right to create a certain type of object.
- Parameters
-
objectId | [in] Unique identifier of the object |
- Returns
- true - The current user has sufficient privileges to create the given type of objects.
- false - The current user is not allowed to create the given type of objects.
- Example
ACAPI_WriteReport (
"You have insufficient privileges to create Line Type attributes",
true);
API_Guid ACAPI_Teamwork_FindLockableObjectSet(const GS::UniString &objectSetName)
Retrieves the unique identifier of a lockable object set with a string identifier.
bool ACAPI_Teamwork_HasCreateRight(const API_Guid &objectId)
Checks whether the current Teamwork user has access right to create a certain type of object.
Represents a GS::Guid in the API layer.
Definition: API_Guid.hpp:46
◆ ACAPI_Teamwork_HasDeleteModifyRight()
bool ACAPI_Teamwork_HasDeleteModifyRight |
( |
const API_Guid & |
objectId | ) |
|
Checks whether the current Teamwork user has access right to delete or modify a certain type of object.
- Parameters
-
objectId | [in] Unique identifier of the object |
- Returns
- true - The current user has sufficient privileges to delete or modify the given type of objects.
- false - The current user is not allowed to delete or modify the given type of objects.
- Example
ACAPI_WriteReport (
"You have insufficient privileges to modify/delete Fill Type attributes",
true);
bool ACAPI_Teamwork_HasDeleteModifyRight(const API_Guid &objectId)
Checks whether the current Teamwork user has access right to delete or modify a certain type of objec...
◆ ACAPI_Teamwork_IsOnline()
bool ACAPI_Teamwork_IsOnline |
( |
void |
| ) |
|
Tells whether the client is online connected to the BIM server.
- Returns
- true - The Teamwork user is working in online mode.
- false - The Teamwork user is working in offline mode.
- Example
bool ACAPI_Teamwork_IsOnline(void)
Tells whether the client is online connected to the BIM server.
◆ ACAPI_Teamwork_IsServerLibPart()
bool ACAPI_Teamwork_IsServerLibPart |
( |
const IO::Location & |
location | ) |
|
Tells whether the given location refers to a BIM Server Library Part.
- Parameters
-
location | [in] Location of a library part. |
- Returns
- true - The given location is a BIM Server Library Part.
- false - The given location is not a BIM Server Library Part.
◆ ACAPI_Teamwork_ProjectSharing()
Returns the project sharing data in the case of a TeamWork project.
- Parameters
-
sharingInfo | data of the registered members of the team project |
- Returns
- NoError - The function completed with success.
- APIERR_BADPARS - sharingInfo is nullptr.
- APIERR_NOPLAN - sharingInfo is nullptr.
- APIERR_MEMFULL - Low memory condition.
- Example
Int32 i;
char buffer[256];
GSErrCode err;
err = ACAPI_Environment (APIEnv_ProjectSharingID, &sharingInfo, nullptr, nullptr);
if (err) {
GiveMessage_Err ("Error in APIEnv_ProjectSharingID", err);
return;
}
for (i = 0; i < sharingInfo.
nUsers; i++) {
sprintf (buffer, " \"%10s\" id:%2d %s",
(*sharingInfo.
users)[i].name,
(*sharingInfo.
users)[i].userId,
(*sharingInfo.
users)[i].connected ?
"Connected" :
"");
if ((*sharingInfo.
users)[i].userId == projectInfo.userId)
buffer[0] = '*';
GiveMessage (buffer, false);
}
BMKillHandle ((GSHandle *) &sharingInfo.
users);
Project sharing parameters.
Definition: APIdefs_Environment.h:493
API_UserInfo ** users
Data of each registered member.
Definition: APIdefs_Environment.h:505
Int32 nUsers
Number of registered members of the active project.
Definition: APIdefs_Environment.h:499
◆ ACAPI_Teamwork_ReceiveChanges()
GSErrCode ACAPI_Teamwork_ReceiveChanges |
( |
| ) |
|
Receives changes from the BIMcloud server.
- Since
- Archicad 25
- Returns
- NoError - The function has completed with success.
- APIERR_NOPLAN - There is no open project.
- APIERR_NOTEAMWORKPROJECT - The current project is not a Teamwork project.
- Example
The Teamwork_Control
example project of the DevKit shows examples of how to use this function.
◆ ACAPI_Teamwork_ReleaseElements()
GSErrCode ACAPI_Teamwork_ReleaseElements |
( |
const GS::Array< API_Guid > & |
elements, |
|
|
bool |
enableDialogs = true |
|
) |
| |
Releases elements in Teamwork mode.
- Since
- Archicad 25
- Parameters
-
elements | [in] List of elements to be released. |
enableDialogs | [in] Show dialogs during the process? (optional, by default the dialogs are enabled) |
- Returns
- NoError - The function has completed with success.
- APIERR_NOPLAN - There is no open project.
- APIERR_NOTEAMWORKPROJECT - The current project is not Teamwork project.
- Example
GS::PagedArray<API_Guid> elements;
elements.Push (elementToRelease.header.guid);
GSErrCode ACAPI_Teamwork_ReleaseElements(const GS::Array< API_Guid > &elements, bool enableDialogs=true)
Releases elements in Teamwork mode.
◆ ACAPI_Teamwork_ReleaseHotlinkCacheManagement()
GSErrCode ACAPI_Teamwork_ReleaseHotlinkCacheManagement |
( |
void |
| ) |
|
Releases the Hotlink/XRef Management in Teamwork mode.
- Returns
- NoError - The function has completed with success.
- Error - The Hotlink/XRef Management is reserved by another team member.
- APIERR_NOPLAN - There is no open project.
- APIERR_NOTEAMWORKPROJECT - The current project is not a Teamwork project.
- Example
if (err != NoError) {
ACAPI_WriteReport (
"The Hotlink/XRef Management has been successfully released.",
true);
}
GSErrCode ACAPI_Teamwork_ReleaseHotlinkCacheManagement(void)
Releases the Hotlink/XRef Management in Teamwork mode.
◆ ACAPI_Teamwork_ReleaseLockable()
GSErrCode ACAPI_Teamwork_ReleaseLockable |
( |
const API_Guid & |
objectId, |
|
|
bool |
enableDialogs = true |
|
) |
| |
Releases a lockable object set in Teamwork mode.
- Since
- Archicad 25
- Parameters
-
objectId | [in] Unique identifier of the lockable object set |
enableDialogs | [in] Show dialogs during the process? |
- Returns
- 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.
- Example
if (lockableStatus == APILockableStatus_Editable) {
if (errCode == NoError)
else
} else {
}
API_LockableStatus
Possible Teamwork lockable status.
Definition: APIdefs_Environment.h:425
API_LockableStatus ACAPI_Teamwork_GetLockableStatus(const API_Guid &objectId, GS::PagedArray< short > *conflicts=nullptr)
Retrieves the reservation status of a lockable object set.
◆ ACAPI_Teamwork_ReserveElements()
GSErrCode ACAPI_Teamwork_ReserveElements |
( |
const GS::Array< API_Guid > & |
elements, |
|
|
GS::HashTable< API_Guid, short > * |
conflicts = nullptr , |
|
|
bool |
enableDialogs = true |
|
) |
| |
Reserves elements in Teamwork mode.
- Since
- Archicad 25
- Parameters
-
elements | [in] List of elements to be reserved. |
conflicts | [out] List of elements which cannot be reserved (optional, can be nullptr). |
enableDialogs | [in] Show dialogs during the process? (optional, by default the dialogs are enabled) |
- Returns
- NoError - The function has completed with success.
- APIERR_NOPLAN - There is no open project.
- APIERR_NOTEAMWORKPROJECT - The current project is not Teamwork project.
- Example
GS::PagedArray<API_Guid> elements;
GS::HashTable<API_Guid, short> conflicts;
elements.Push (elementToReserve.header.guid);
if (conflicts.IsEmpty ())
GSErrCode ACAPI_Teamwork_ReserveElements(const GS::Array< API_Guid > &elements, GS::HashTable< API_Guid, short > *conflicts=nullptr, bool enableDialogs=true)
Reserves elements in Teamwork mode.
◆ ACAPI_Teamwork_ReserveHotlinkCacheManagement()
GSErrCode ACAPI_Teamwork_ReserveHotlinkCacheManagement |
( |
short * |
conflict = nullptr | ) |
|
Reserves the Hotlink/XRef Management in Teamwork mode.
- Parameters
-
conflict | [out] userId of the current owner if there is any (optional, can be nullptr). |
- Returns
- NoError - The function has completed with success.
- Error - The Hotlink/XRef Management is reserved by another team member.
- APIERR_NOPLAN - There is no open project.
- APIERR_NOTEAMWORKPROJECT - The current project is not a Teamwork project.
- Example
short conflict;
if (err != NoError) {
ACAPI_WriteReport (
"The Hotlink/XRef Management has been successfully reserved by this client.",
true);
} else {
}
GSErrCode ACAPI_Teamwork_ReserveHotlinkCacheManagement(short *conflict=nullptr)
Reserves the Hotlink/XRef Management in Teamwork mode.
◆ ACAPI_Teamwork_ReserveLockable()
GSErrCode ACAPI_Teamwork_ReserveLockable |
( |
const API_Guid & |
objectId, |
|
|
GS::PagedArray< short > * |
conflicts = nullptr , |
|
|
bool |
enableDialogs = true |
|
) |
| |
Reserves a lockable object set in Teamwork mode.
- Since
- Archicad 25
- Parameters
-
objectId | [in] Unique identifier of the lockable object set |
conflicts | [out] List of conflicting users (optional, can be nullptr or omitted) |
enableDialogs | [in] Show dialogs during the process? (optional, by default the dialogs are enabled) |
- Returns
- 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 lock cannot be obtained, or the operation has failed due to communication or server error.
- Example
if (lockableStatus == APILockableStatus_Free) {
if (errCode == NoError)
else
} else if (lockableStatus == APILockableStatus_Editable) {
} else {
}
◆ ACAPI_Teamwork_SendChanges()
GSErrCode ACAPI_Teamwork_SendChanges |
( |
const GS::UniString & |
comment = GS::EmptyUniString | ) |
|
Sends changes to the BIMcloud server.
- Since
- Archicad 25
- Parameters
-
comment | [in] Comment attached to the Send operation. |
- Returns
- NoError - The function has completed with success.
- APIERR_NOPLAN - There is no open project.
- APIERR_NOTEAMWORKPROJECT - The current project is not a Teamwork project.
- Example
The Teamwork_Control
example project of the DevKit shows examples of how to use this function.
◆ ACAPI_Teamwork_SendReleaseCommentMail()
GSErrCode ACAPI_Teamwork_SendReleaseCommentMail |
( |
const API_Guid & |
objectId, |
|
|
short |
dialogId |
|
) |
| |
Sends the release comment mail.
- Parameters
-
objectId | [in] The unique identifier of this interface (that you passed during registration). |
dialogId | [in] The dialog ID you registered the interface for. |
- Returns
- NoError - The function completed with success.
◆ ACAPI_UnregisterTeamworkReserveInterface()
GSErrCode ACAPI_UnregisterTeamworkReserveInterface |
( |
const API_Guid & |
objectId, |
|
|
short |
dialogId = 0 |
|
) |
| |
Unregisters a previously registered interface.
- Parameters
-
objectId | [in] The unique identifier of this interface (that you passed during registration). |
dialogId | [out] The dialog ID you registered the interface for. |
- Returns
- NoError - The function completed with success.
- APIERR_BADID -
objectId
is not registered.