AnsweredAssumed Answered

poAdder.CommitAdd .......ERROR

Question asked by Jiaqiang Zhang on Mar 9, 2012
Latest reply on Jun 11, 2012 by Sylvain Trudel

Good afternoon everyone ,the following code will prompt user cancelled error,please help me,thanks!

   

       

IEdmBatchAdd poAdder = poVault.CreateUtility(EdmUtility.EdmUtil_BatchAdd) as IEdmBatchAdd;

 

            poAdder.AddFileFromPath("d:\test1.dwg", lParentFolderID, 333, "copy of test1.dwg", 256);
            poAdder.AddFileFromPath("d:\test2.dwg", lParentFolderID, 333, "copy of test2.dwg", 256);
            poAdder.AddFileFromPath("d:\test3.dwg", lParentFolderID, 333, "copy of test3.dwg", 256);
            poAdder.AddFileFromPath("d:\test4.dwg", lParentFolderID, 333, "copy of test4.dwg", 256);

 

           Array aoItems = Array.CreateInstance(typeof(EdmFileInfo),4);     
           poAdder.CommitAdd(0, aoItems, 0, null);


            string msg = "";
            string row ="" ;

 

            foreach (EdmFileInfo s in aoItems)
            {
                 row= "(" + s.mbsPath + ") arg=" + s.mlArg.ToString()+ "result="+s.mhResult;
                 msg = msg + row;
            }

 

MessageBox.Show(msg);

Outcomes