Skip to main content
selvakkanit19061983
Known Participant
November 23, 2017
Question

Problem in PutFileDialog and GetFileDialog

  • November 23, 2017
  • 1 reply
  • 1496 views

I have been migrated source from CS4 to CC2018.

Os: mac 10.13.1

AIFileDialogFilters ops;

sAIUser->PutFileDialog(ai::UnicodeString(Title), &ops, ai::UnicodeString(csvFileName), outCSVFile);

sAIUser->GetFileDialog(ai::UnicodeString(Title), &ops, outCSVFile);

I have problem in above code snippet. There is no dialog will opened.

And I tried to set filter of *.csv files.

But it run correctly in Windows machine.

How can I set filter to this function?

Or any other possible cases available to replace this function?

Regards,

Sandy

This topic has been closed for replies.

1 reply

Inspiring
November 29, 2017

This code works for me on CC 2018 on mac:

        AIFileDialogFilters filter;

        filter.AddFilter(ai::UnicodeString("*.ai"));

        filter.AddFilter(ai::UnicodeString("*.*"));

        ai::UnicodeString path("/Users/Shared");

        ai::FilePath fp(path);

        sAIUser->PutFileDialog(ai::UnicodeString("Save File"),&filter,ai::UnicodeString("MyFile.ai"),fp);

selvakkanit19061983
Known Participant
November 29, 2017

Thank you for your reply,

Your code works but, the dialog opens and disappear automatically in fractions of seconds and Illustrator has no responds for any other input. I will quit illustrator by Force Quit... option. Is any other process to do after this snippet?

There is same problem for following snippet,

sAIUser->GetFileDialog(ai::UnicodeString("Save File"),&filter, fp);

regards,

Sandy

Inspiring
November 29, 2017

It works fine for me. When do you call this code? What else is your plugin doing?