How to use FindWhereUsed() & WhereUsedCriteria(".dft", True) in revision manager API in vb.net?

Hello Friends,

 

I need help in Revision Manger API using VB.net.

 

Can anyone knows how to use  FindWhereUsed() & WhereUsedCriteria() method in vb.net.

if anyone has any sample programm,please shared with me.

 

 

Thanks & Regards,

Hitendra

 

 

Posted by: K Chaudhari
Post date: 9/22/2011 9:51:19 PM

2 REPLIES

RE: How to use FindWhereUsed() & WhereUsedCriteria(".dft", True) in revision manager API in vb.net?

@Hitendra,

 

here an example (excerpt of a class):

 

       ...        Private _RevMgr As RevisionManager.Application       Private _LinkedFiles As SortedSet(Of String)       Private _DftFiles As List(Of String)        _RevMgr = New RevisionManager.Application        _DftFiles = New List(Of String)                ' Set the where used criteria (with searchSubDirs as boolean and rootDir as string)        _RevMgr.WhereUsedCriteria("*.dft", searchSubDirs) = rootDir        ' Get the first document matching the where used criteria (with seDocPathname as string)        Dim whereUsedDoc As RevisionManager.Document = TryCast(_RevMgr.FindWhereUsed(seDocPathName), RevisionManager.Document)        While (whereUsedDoc IsNot Nothing)            ' Add pathname of found document to a list            If Not _DftFiles.Contains(whereUsedDoc.FullName) Then                _DftFiles.Add(CType(whereUsedDoc.FullName, String))            End If            Marshal.ReleaseComObject(whereUsedDoc)            whereUsedDoc = Nothing            ' Get next document matching the where used criteria            whereUsedDoc = TryCast(_RevMgr.FindWhereUsed(), RevisionManager.Document)        End While        ...

 

Posted by: Wolfgang Kunert
Post date: 9/22/2011 10:17:50 PM

RE: How to use FindWhereUsed() & WhereUsedCriteria(".dft", True) in revision manager API in vb.net?

Thanks you so much Wolfgang Kunert . Your example solved my problem.

 

Posted by: K Chaudhari
Post date: 1/9/2012 4:00:40 PM