Skip to content

Teamwork

Inspect Teamwork users, rights and reservations, reserve or release project resources, and send or receive changes.

Access this group through api.tapir.teamwork.

Commands

For exceptions shared by Unified API commands, see error handling.

get_lockable_object_set_status

get_lockable_object_set_status(
    object_set_name: str,
) -> GetLockableObjectSetStatusResult

Returns the Teamwork reservation status of a non-element lockable object set and the users who hold it.

Parameters:

  • object_set_name (str) –

    The name of the lockable object set, as the Archicad API documents it: BuildingMaterials, Cities, Composites, Favorites, FillTypes, LayerSettingsDialog (layers and layer combinations), LineTypes, MarkupStyles, MEPSystems, ModelViewOptions, OperationProfiles, PenTables, Profiles, ProjectInfo, GeoLocation (project location), PreferencesDialog (project preferences and dimension standards), GraphicOverrides (renovation override styles), Surfaces or ZoneCategories. Other names the Archicad API accepts work too.

Returns:

get_reservation_status_of_elements

get_reservation_status_of_elements(
    elements: list[ElementIdArrayItem],
) -> list[ElementReservationStatus | ErrorItem]

Returns the Teamwork reservation status of elements without reserving them: whether each element is free, reserved by the current user or reserved by another user, with the reserving user. New elements stay reserved by the user who created them until they are released.

Parameters:

Returns:

get_teamwork_access_rights

get_teamwork_access_rights(
    access_rights: None | list[str] = None,
) -> list[AccessRight]

Returns whether the role of the current user has the given Teamwork access rights (API_TWAccessRights names without the API prefix, e.g. LayersCreate), all of them when no names are given.

Parameters:

  • access_rights (None | list[str], default: None ) –

    The names of the access rights to check, the API_TWAccessRights enumerators without the API prefix, e.g. LayersCreate or LibraryPartDeleteModify. All rights available in this Archicad version are checked when omitted.

Returns:

  • list[AccessRight] –

    The rights of the current user, in the requested order.

get_teamwork_owners_of_databases

get_teamwork_owners_of_databases(
    databases: list[DatabaseIdArrayItem],
) -> list[ErrorItem | User]

Returns the Teamwork owner (user id and name) of each given database, e.g. of a layout or a view database. The user id is 0 when nobody owns the database.

Parameters:

Returns:

  • list[ErrorItem | User] –

    The Teamwork owner of each given database, in the order of the input. userId is 0 when nobody owns the database.

get_teamwork_project_info

get_teamwork_project_info() -> GetTeamworkProjectInfoResult

Tells whether the opened project is a Teamwork project and whether it is online, and returns its BIMcloud server, project name and the current user (id and name).

Returns:

get_teamwork_rights_of_objects

get_teamwork_rights_of_objects(
    object_ids: list[GuidId],
) -> list[ErrorItem | Rights]

Returns for each given object, for example an element, whether the current Teamwork user has the right to create objects of its kind and to delete or modify it.

Parameters:

  • object_ids (list[GuidId]) –

    The objects to check, by guid, for example element guids.

Returns:

  • list[ErrorItem | Rights] –

    One item per input object, in the same order.

get_teamwork_status

get_teamwork_status() -> GetTeamworkStatusResult

Returns whether the opened project is a Teamwork project and is online, the members of the shared project and who has reserved the Hotlink and XRef management. Works in a solo project too, then isShared and isOnline are false.

Returns:

grant_elements

grant_elements(
    elements: list[ElementIdArrayItem], user_id: float
) -> SuccessfulExecutionResult

Hands over the reservation of elements to another Teamwork user, given by user id, without a dialog. Available from Archicad 27.

Parameters:

  • elements (list[ElementIdArrayItem]) –

    A list of elements.

  • user_id (float) –

    The Teamwork user id of the user to hand the elements over to, as GetTeamworkProjectInfo, GetReservationStatusOfElements and the conflicts of ReserveElements report users.

Returns:

release_elements

release_elements(
    elements: list[ElementIdArrayItem],
) -> SuccessfulExecutionResult

Releases elements in Teamwork mode. Fails, naming them, when any of the given GUIDs is not an element; the other elements are released.

Parameters:

Returns:

release_hotlink_cache_management() -> (
    SuccessfulExecutionResult
)

Releases the Hotlink and XRef management in Teamwork mode.

Returns:

release_lockable_object_set

release_lockable_object_set(
    object_set_name: str,
) -> SuccessfulExecutionResult

Releases a non-element lockable object set reserved with ReserveLockableObjectSet in Teamwork mode.

Parameters:

  • object_set_name (str) –

    The name of the lockable object set, as the Archicad API documents it: BuildingMaterials, Cities, Composites, Favorites, FillTypes, LayerSettingsDialog (layers and layer combinations), LineTypes, MarkupStyles, MEPSystems, ModelViewOptions, OperationProfiles, PenTables, Profiles, ProjectInfo, GeoLocation (project location), PreferencesDialog (project preferences and dimension standards), GraphicOverrides (renovation override styles), Surfaces or ZoneCategories. Other names the Archicad API accepts work too.

Returns:

remove_libraries_from_bi_mcloud

remove_libraries_from_bi_mcloud(
    library_names: list[str],
    server_url: str,
    parent_path: str,
) -> list[
    FailedExecutionResult | SuccessfulExecutionResult
]

Removes libraries, given by name, from a folder of a BIMcloud or Teamwork server. Returns a result per library. Available from Archicad 29.

Parameters:

  • library_names (list[str]) –

    The names of the libraries on the server to remove.

  • server_url (str) –

    The URL of the BIMcloud or Teamwork server, e.g. 'https://bimcloud.example.com:22000'.

  • parent_path (str) –

    The path of the folder on the server that holds the libraries, as shown in BIMcloud Manager.

Returns:

reserve_elements

reserve_elements(
    elements: list[ElementIdArrayItem],
) -> ReserveElementsResult

Reserves elements in Teamwork mode. GUIDs that are not elements (navigator items, layouts, databases) cannot be reserved with it: they are returned in notElements and the execution result fails.

Parameters:

Returns:

reserve_hotlink_cache_management() -> (
    ReserveHotlinkCacheManagementResult
)

Reserves the Hotlink and XRef management in Teamwork mode, which is needed before changing hotlink nodes.

Returns:

reserve_lockable_object_set

reserve_lockable_object_set(
    object_set_name: str,
) -> ReserveLockableObjectSetResult

Reserves a non-element lockable object set (attributes, favorites, project info, project preferences, etc.) in Teamwork mode. The object set is given by its Archicad API name, e.g. 'Composites', 'LayerSettingsDialog' or 'ProjectInfo'.

Parameters:

  • object_set_name (str) –

    The name of the lockable object set, as the Archicad API documents it: BuildingMaterials, Cities, Composites, Favorites, FillTypes, LayerSettingsDialog (layers and layer combinations), LineTypes, MarkupStyles, MEPSystems, ModelViewOptions, OperationProfiles, PenTables, Profiles, ProjectInfo, GeoLocation (project location), PreferencesDialog (project preferences and dimension standards), GraphicOverrides (renovation override styles), Surfaces or ZoneCategories. Other names the Archicad API accepts work too.

Returns:

teamwork_receive

teamwork_receive() -> SuccessfulExecutionResult

Performs a receive operation on the currently opened Teamwork project.

Returns:

teamwork_send

teamwork_send() -> SuccessfulExecutionResult

Performs a send operation on the currently opened Teamwork project.

Returns:

upload_libraries_to_bi_mcloud

upload_libraries_to_bi_mcloud(
    library_paths: list[str],
    server_url: str,
    parent_path: str,
) -> list[
    FailedExecutionResult | SuccessfulExecutionResult
]

Uploads local library folders or container files (.lcf) to a folder of a BIMcloud or Teamwork server, as BIMcloud libraries. Returns a result per library. Available from Archicad 29.

Parameters:

  • library_paths (list[str]) –

    The paths of the local library folders or container files (.lcf) to upload.

  • server_url (str) –

    The URL of the BIMcloud or Teamwork server, e.g. 'https://bimcloud.example.com:22000'.

  • parent_path (str) –

    The path of the folder on the server that holds the libraries, as shown in BIMcloud Manager.

Returns:

These include the parameter and result models used inside the client. The command signatures above show what to pass and what is returned.