• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Reg:ai File is not open in MAC

Community Beginner ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

Dear Friends,

    I have faced a problem while opening a file in Illustrator CC 2017 on MAC X  machine.

    please see the code below.

AIDocumentHandle document;

AIColorModel colorModel = kAIUnknownColorModel;

AIBoolean forceCopy=false;

const ai::UnicodeString openFilePath("/Users/Admin/Desktop/123.ai");

ai::FilePath path(openFilePath,true);

ActionDialogStatus dialogStatus = kDialogNone;

AIErr error=kNoErr;

error=sAIDocumentList->Open(path, colorModel, dialogStatus, forceCopy, &document);

   open() method returns kNoErr,but the document (ai file) is not opened.This is the Problem.

   Note that:the same code is working fine in Windows.

please give your suggestion to solve this problem.

Thank you friends,

Nathan.

TOPICS
SDK

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Advocate ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

File and folder names are case sensitive on mac and user folder is normally lowercase, so are you sure it shouldn't be "/Users/admin/Desktop/123.ai" ? If the file doesn't open you should get an error returned, so not sure why you are getting kNoErr, did you post your exact code?

Why do you put "Reg:" in front of your questions?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

Dear Friend,

Thank you for your Immediate reply.

I am sure that I have  posted my exact code.

Users Directory  in My Machine shows like My code(U in Uppercase) (Please see the attached image).

  Path Of AI File.PNG

please note that:open() method returns 0.But the file is not opened in Illustrator.

please give your suggestion.

regards,

Nathan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jan 25, 2017 Jan 25, 2017

Copy link to clipboard

Copied

You mentioned in another thread that you were using CC2017.1 -- that's not officially released yet, so I assume that means you're in the pre-release program? If so, you should ask this on the forums there as this could be a bug in the pre-release build.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 27, 2017 Jan 27, 2017

Copy link to clipboard

Copied

Dear Friend,

Thank you for your Immediate reply.

I mentioned in Save as PDF Thread is  illustrator CC(17.1), not CC 2017.1. Please see the below Image.

But sAIDocumentList->Open problem occurs in CC 2017(21.0.2). With MAC OS.

please give your suggestion to solve this Problem.

Regards,

Nathan.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 27, 2017 Jan 27, 2017

Copy link to clipboard

Copied

When you open the 123.ai file in Illustrator on Mac, do you get any popup dialogs?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Dear Friend,

There is no popup dialogs shown at the time of Openning 123.ai File in Illustrator on Mac.

Thank you Friend,

Nathan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

How do you know that sAIDocumentList->Open returns kNoErr? Do you output a debug string to stdout/stderr? Do you check the value in the debugger?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Dear Friend,

Thank You For Your Immediate Reply.

I Run My Plugin code With  Attach to Process(Xcode ->Illustrator).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Ok, that's good as it means you are definitely running the version you have built.

Is this code called when you get a plugin message or from a callback? If it is from a callback, are you setting the AppContext?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Dear Friend,

   This code is called when i get a plugin message.

   I am trying to open a File in CheckMe Menu item of MenuPlay Project(SampleCode in Illustrator SDK).

   See the Image shown below.

Please give your suggestion,

Thank you Friend,

Nathan.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 07, 2017 Feb 07, 2017

Copy link to clipboard

Copied

I tried using your code in the MenuPlay sample on Mac and it worked fine for me. The only thing I would change would be to initialise document:

AIDocumentHandle document = NULL;

But I don't think this will fix your problem.

The only other possible reason I can think of why it wouldn't work on your machine would be if you have some other plugin that says that it can open AI files. Have you installed or built any other plugins on your mac?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 08, 2017 Feb 08, 2017

Copy link to clipboard

Copied

LATEST

Dear Friend,

Thankyou for your suggestion,

I have tried with AIDocumentHandle document = NULL to initialize the document.

but the problem is not solved.

And There is no other plugins in My Mac Machine.

regards,

Nathan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines