cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue with getting the opened project's name

Hello,

I'm trying to get the current opened project's name. Here is my code, which should work according to the documentation, but it doesn't seem to work:
GSErrCode            err;
    API_ProjectInfo info;
    
    err = ACAPI_Environment (APIEnv_ProjectID, &info, nullptr);
    if (err != NoError){
        ErrorBeep ("APIEnv_ProjectID", err);
    }
    else{
        WriteReport("project path is %s", info.projectPath); // returns null always
        WriteReport("project name is %s", info.projectName); // returns null always
    }
Is there any other specific thing that should be done in order to make this work? Is the project name something different than the filename of the pln?

P.S. I am opening an already saved project.

Any help will be appreciated,
Julian
2 Replies 2
Anonymous
Not applicable
I have tried printing the untitled property:
WriteReport("project untitled is %s",(info.untitled)?"true":"false"); // returns false always 
Why it says that the file is not saved? I'm opening an already saved project.
Mihaly Palenik
Graphisoft
Graphisoft
Hello,

Unfortunately this is a bug. We will try to do the best to fix it as soon as possible.

Best,
Mihály

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!