We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2015-04-01 11:13 PM - last edited on 2023-08-01 01:26 PM by Doreena Deng
Solved! Go to Solution.
2015-04-07 04:08 PM
API_ProjectInfo projectInfo; GSErrCode err = ACAPI_Environment (APIEnv_ProjectID, &projectInfo, NULL); if (err != NoError) { ErrorBeep ("APIEnv_ProjectID", err); return; } if (projectInfo.untitled) { WriteReport ("Project file has not been saved yet"); } else { IO::Path projectPath; IO::Name projectName; if (!projectInfo.teamwork) { projectInfo.location->ToPath (&projectPath); WriteReport ("Solo Project location: %s", (const char *) projectPath); projectInfo.location->GetLastLocalName (&projectName); WriteReport ("Project Name: %s", (const char *) projectName.ToCStr ()); } else { projectInfo.location_team->ToPath (&projectPath); WriteReport ("Shared Project: %s", (const char *) projectPath); projectInfo.location_team->GetLastLocalName (&projectName); WriteReport ("Project Name: %s", (const char *) projectName.ToCStr ()); } if (projectInfo.location != NULL) delete projectInfo.location; if (projectInfo.location_team != NULL) delete projectInfo.location_team; }Regards,
2015-04-07 04:08 PM
API_ProjectInfo projectInfo; GSErrCode err = ACAPI_Environment (APIEnv_ProjectID, &projectInfo, NULL); if (err != NoError) { ErrorBeep ("APIEnv_ProjectID", err); return; } if (projectInfo.untitled) { WriteReport ("Project file has not been saved yet"); } else { IO::Path projectPath; IO::Name projectName; if (!projectInfo.teamwork) { projectInfo.location->ToPath (&projectPath); WriteReport ("Solo Project location: %s", (const char *) projectPath); projectInfo.location->GetLastLocalName (&projectName); WriteReport ("Project Name: %s", (const char *) projectName.ToCStr ()); } else { projectInfo.location_team->ToPath (&projectPath); WriteReport ("Shared Project: %s", (const char *) projectPath); projectInfo.location_team->GetLastLocalName (&projectName); WriteReport ("Project Name: %s", (const char *) projectName.ToCStr ()); } if (projectInfo.location != NULL) delete projectInfo.location; if (projectInfo.location_team != NULL) delete projectInfo.location_team; }Regards,
2015-04-13 10:23 PM
2018-10-17 05:48 PM
API_ProjectInfo projectInfo; GSErrCode err = ACAPI_Environment(APIEnv_ProjectID, &projectInfo, NULL); if (err != NoError) { ErrorBeep("APIEnv_ProjectID", err); return; } if (projectInfo.untitled) { WriteReport("Project file has not been saved yet"); } else { DBPrintf("\n\nprojectname = %s \n\n", projectInfo.projectName); }When reading this page:
2018-10-23 08:42 PM
projectInfo.projectName->ToCStr()->Get()So instead of this:
wacim wrote:Use this:
Here's how i'm attempting to do this:API_ProjectInfo projectInfo; ... DBPrintf("\n\nprojectname = %s \n\n", projectInfo.projectName);
API_ProjectInfo projectInfo; ... DBPrintf("\n\nprojectname = %s \n\n", projectInfo.projectName->ToCStr()->Get());I hope this helps.
2018-10-26 03:30 PM