怎么用AddFolderWithCategory? (Vault)

来源:互联网 发布:multisim mac版 编辑:程序博客网 时间:2024/04/30 09:25

问:我想通过编程在Vault中创建一个文件夹,并且设置它的类型。

答:请参考下面的例子代码:

          DocumentService docSvc = m_serviceManager.DocumentService;

          long parentId = docSvc.GetFolderRoot().Id;

 

          CategoryService catSvc= m_serviceManager.CategoryService;

          Cat[] cts = catSvc.GetCategoriesByEntityClassId("Folder", true);

 

          DocumentServiceExtensions docExt = m_serviceManager.DocumentServiceExtensions;

          docExt.AddFolderWithCategory("newFolder", parentId, false,cts[1].Id);.

 

原创粉丝点击