Returns information on the current project file.
GSErrCode ACAPI_Environment ( APIEnv_ProjectID, API_ProjectInfo* projectInfo );
Parameters
- projectInfo
- [out] Project file and teamwork project specific data.
Return Values
NoError
- No error occurred.
APIERR_BADPARS
projectInfo
isnullptr
.APIERR_NOPLAN
- No open project.
APIERR_MEMFULL
- Low memory condition.
For other common API errors see the API Errors document.
Remarks
This function is used to get information on the project file. In teamwork mode, the teamwork related data are also available. See the definitions of the returned parameters at API_ProjectInfo.
The file specification is available only if the project file has been saved before. For ‘untitled’ project no data is returned.
Do not forget to delete the IO::Location objects created by the function.
Example
API_ProjectInfo projectInfo; ACAPI_Environment (APIEnv_ProjectID, &projectInfo, nullptr); if (projectInfo.location != nullptr) delete projectInfo.location; if (projectInfo.location_team != nullptr) delete projectInfo.location_team;
Requirements
- Version: API 2.1 or later
- Header: APIdefs_Environment.h