4 Replies Latest reply: Apr 5, 2010 2:31 AM by 3DTOPO RSS

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

    SriBSri Community Member

      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