Skip navigation
SriBSri
Currently Being Moderated

How to open a document from a known path from Plugin, I am using CS4

Apr 5, 2010 2:02 AM

Hi

 

I have some files in one of the location and wanted to open through plugin

 

I have a piece of code which does not throw any error nor opens the document

 

I get the message "Before" and "After"

 

i would like to know where am i going wrong

 

Code below:

 

 

const ASUnicode *s = (ASUnicode *) "C:\\test.ai";

AIColorModel colorModel = kAIUnknownColorModel;

ai::FilePath path;

path.Set(ai::UnicodeString(s),

false);

ActionDialogStatus dialogStatus = kDialogNone;

AIBoolean forceCopy=

false;

sADMBasic->MessageAlert("Before");

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

sADMBasic->MessageAlert("After")

 

 

Experts, Please help me

 

Thanks

Srinivas

 
Replies
  • Currently Being Moderated
    Apr 5, 2010 2:07 AM   in reply to SriBSri

    Hi Srinivas,

     

    Try setting path like this:

     

    ai::FilePath path (s, true);

     

     

    Any difference?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 5, 2010 2:31 AM   in reply to SriBSri

    Sorry,

     

    Try setting s like this too:

     

    const ai::UnicodeString exportPath_Uni( "C:\\test.ai" );

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points