cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
kency
Enthusiast

Create New Project using ACAPI_ProjectOperation_NewProject

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()

2 Replies 2
Viktor Kovacs
Graphisoft
Graphisoft

Please make sure you are not using the DEMO version of Archicad. The DEMO version can't save files.

kency
Enthusiast

Yes, @Viktor Kovacs tried on the licensed version of Archicad. Missed out on mentioning the same.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!