2024-03-04 12:06 PM - last edited on 2024-09-17 11:24 AM by Doreena Deng
Hello all,
I was trying to create a new project when the add-on gets triggered and I saw the function
ACAPI_ProjectOperation_NewProject which opens a new project. But I would like to also save the existing project before opening a new project. I tried the below code:
GSErrCode CreateNewProject() {
API_NewProjectPars npp = {};
npp.newAndReset = true;
npp.enableSaveAlert = true;
GSErrCode err = ACAPI_ProjectOperation_NewProject (&npp);
return err;
}
In spite of having the enableSaveAlert to true, it did not give me any alert. Also, I had tried the
ACAPI_ProjectOperation_Save() function as well. But this also did not Save anything.
Is my expectation right for these functions/params? Or is there any other way through which we can do a Save of the existing project and post that open a new project?
Notes:
Tried on MacOS(Intel)
Archicad 27 and on 25 with the ACAPI_Automate()
2024-03-05 07:11 PM
Please make sure you are not using the DEMO version of Archicad. The DEMO version can't save files.
2024-03-06 07:49 AM
Yes, @Viktor Kovacs tried on the licensed version of Archicad. Missed out on mentioning the same.