how to get filesite server file use C#.net

Sep 18 2012 5:38 AM
How to get filesite files using  imanage and IMANEXTLib

i used for following code:

 IManWorkArea docuworka;
        IManDMS dms = new ManDMSClass();
       

        IManSession sess = dms.Sessions.Add(SERVERNAME);
        sess.TrustedLogin();
        docuworka = sess.WorkArea;
        IManDatabase db = sess.Databases.ItemByName(DATABASENAME);
        IManProfileSearchParameters ipro = dms.CreateProfileSearchParameters();
        ipro.Add(imProfileAttributeID.imProfileCustom1, sess.UserID);
        ipro.Add(imProfileAttributeID.imProfileCustom2, "Test Matter");
        IManContents doc = db.SearchDocuments(ipro, true);
      
        IManage.IManDocument odocumetn;
        IMANEXTLib.ContextItems docitem;
        IMANEXTLib.OpenCmd pOpenCmd;
        odocumetn = db.GetDocument(7682345, 1);

        //add gropu name or
        //odocumetn.Security.GroupACLs.Add("", imAccessRight.imRightReadWrite);
        // odocumetn.Security.UserACLs.Add(sess.UserID, imAccessRight.imRightReadWrite);
        docitem = new IMANEXTLib.ContextItems();
        pOpenCmd = new IMANEXTLib.OpenCmd();
        docitem.Add("SelectedNRTDocuments", odocumetn);
        pOpenCmd.Initialize(docitem);
        pOpenCmd.Update();
        pOpenCmd.Execute();



any one give some tips on this