2021-10-05 09:49 PM
Hello, I am trying to open a Teamwork Project on a C++ Addon, but so far I haven't been successful. Is there any documentation available about this?
So far I've tried to open it through the ACAPI_Automate (APIDo_OpenID) as per the following excerpt, but it fails with error code -7003 (which isn't listed on APIdefs_ErrorCodes.h):
IO::Location twProject;
// The actual input data was inspected from an APIEnv_ProjectID call on a Teamwork project up to the point where the toURL method output was identical
twProject.AppendToNetwork(IO::Name("NETWORK_NAME"));
twProject.AppendToLocal(IO::Name("LOCAL_NAME"));
twProject.SetUserName("TW_USERNAME");
twProject.SetPassword("TW_ENCODED_PASSWORD");
twProject.SetScheme("teamwork");
API_FileOpenPars openPars;
BNZeroMemory(&openPars, sizeof(API_FileOpenPars));
openPars.fileTypeID = APIFType_WGProjFile;
openPars.file = &twProject;
GSErrCode err = ACAPI_Automate(APIDo_OpenID, &openPars, nullptr);
As a matter of fact, if I open a Teamwork Project on Archicad and feed the output of the APIEnv_ProjectID call (location_team) into the API_FileOpenPars file parameters (ie, try to reopen the currently opened TW project) it also fails with the same exact error code.
Is this the right approach for opening Teamwork projects? If yes, what am I doing wrong?
Thank you,
Gustavo Rocha
2022-09-27 08:32 AM
Hello,
it is not possible to open teamwork project through API in the current Archicad instance.