几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   【转帖】pdmwe batch folder unlock - anyone had success (http://www.dimcax.com/hust/showthread.php?t=5608)

yang686526 2009-04-13 01:22 PM

【转帖】pdmwe batch folder unlock - anyone had success
 
pdmwe batch folder unlock - anyone had success?
here's a code snippet that's not working. there doesn't seem to be any example, so it could be way off the mark.
the snippet is intended to check in (unlock) all the files in a pdmwe folder. files were just added & there are no other files in the vault to confuse matters.
dim batchunlock as iedmbatchunlock = login.vault.createutility(edmutility.edmutil_batchunlock)
dim selitem(0) as edmselitem
selitem(0).mlprojid = _vaultmigrationfolder.id
selitem(0).mldocid = 0
batchunlock.addselection(login.vault, selitem)
batchunlock.unlockfiles(handle)
note that "login.vault" is just the vault object & "_vaultmigrationfolder" is the folder object.
anyone have any idea either what's wrong here or what is the right way to do this?
thanks,
tom
answer never mind
it seems i missed a createtree after the addselection. (it should have been obvious...)
quick


所有的时间均为北京时间。 现在的时间是 06:14 AM.