Skip to main content
Inspiring
November 14, 2025
Answered

GetFileNameNoExt returns empty in CC 2026 SDK

  • November 14, 2025
  • 1 reply
  • 64 views

Hi All,

I'm trying to get the active Illustrator document name in my plugin.
The following code works perfectly in Illustrator CC 2024 and CC 2025, but it fails in CC 2026 — GetFileNameNoExt() returns an empty name.

 

    ai::FilePath path;
    ASErr err = sAIDocument->GetDocumentFileSpecification(path);
    if (err == kNoErr && !path.IsEmpty()) {
        ai::UnicodeString name = path.GetFileNameNoExt();
        std::string s = name.as_UTF8();
        if (!s.empty()) return s;
    }

 

Is there something new we are supposed to call before accessing file information?

Any help would be greatly appreciated.

 

Thank you,
Chetan

Correct answer Chetan S

Sorry, my mistake — the issue was on my side.
The files included in my project were accidentally linked to the CC 2025 SDK folder instead of the CC 2026 SDK. After correcting the SDK paths, everything works as expected.

Thanks everyone!

— Chetan

1 reply

Chetan SAuthorCorrect answer
Inspiring
November 14, 2025

Sorry, my mistake — the issue was on my side.
The files included in my project were accidentally linked to the CC 2025 SDK folder instead of the CC 2026 SDK. After correcting the SDK paths, everything works as expected.

Thanks everyone!

— Chetan