Solid Edge Revision Manager Object Library
SearchDocuments Method
Specifies whether to use SearchScope.txt for the scope of the search. TRUE specifies using the search path as specified in the SearchScope.txt: in this case the path specified in “bstrFolder” is not used for searching. FALSE specifies not using the path specified in the SearchScope.txt: iIn this case the path specified in “bstrFolder” is used as the primary search path.
Specifies a comma-separated list of URL folder paths to search. All of the folders must be managed, or all of the folders must be unmanaged.
Specifies whether to include subfolders in the search. TRUE specifies that the search should include the entire directory tree beyond the directory specified in the bstrFolder or searchscope.txt. FALSE specifies that search should only use the directory specified in either the SearchScope.txt or the bstrFolder.
Specifies the documents found in the search.
Specifies the number of documents found in the search.
Specifies a comma-separated list of file types to search (for example, *.par, *.asm).
Specifies up to three properties to match in the search. (Such as "Author", "Title", "SERevisedFrom", "Date", and so forth.)
Specifies conditions for the properties in PropertyList. Valid conditions are <, <=, =, >=, >, "where", and "contains."
Specifies values for the properties in PropertyList, relative to the conditions in ConditionList.
Specifies the number of properties in PropertyList. The variant must be based upon an integer.
Specifies whether to search for properties modified within the past number of days specified by varNumberOfDays.
Specifies the number of days within which modified properties are searched for. This argument must have value if varCheckModified has value.
Specifies the title of each document in the search results.
Specifies the subject of each document in the search results.
Specifies the modified date of each document in the search results.
Description
This method searches for documents according to the criteria you specify.
Syntax
Visual Basic
Public Function SearchDocuments( _
   ByVal bUseSearchScope As Boolean, _
   ByVal bstrFolders As String, _
   ByVal bIncludeSubFolders As Boolean, _
   ByRef ListOfFoundDocuments As Variant, _
   ByRef iNumDocsFound As Long, _
   Optional ByVal varFileFilterOrText As Variant, _
   Optional ByVal PropertyList As Variant, _
   Optional ByVal ConditionList As Variant, _
   Optional ByVal PropertyValueList As Variant, _
   Optional ByVal varNumProps As Variant, _
   Optional ByVal varCheckModified As Variant, _
   Optional ByVal varNumberOfDays As Variant, _
   Optional ByRef ListOfTitles As Variant, _
   Optional ByRef ListOfSubjects As Variant, _
   Optional ByRef ListOfModifiedDates As Variant _
) As Long
Parameters
bUseSearchScope
Specifies whether to use SearchScope.txt for the scope of the search. TRUE specifies using the search path as specified in the SearchScope.txt: in this case the path specified in “bstrFolder” is not used for searching. FALSE specifies not using the path specified in the SearchScope.txt: iIn this case the path specified in “bstrFolder” is used as the primary search path.
bstrFolders
Specifies a comma-separated list of URL folder paths to search. All of the folders must be managed, or all of the folders must be unmanaged.
bIncludeSubFolders
Specifies whether to include subfolders in the search. TRUE specifies that the search should include the entire directory tree beyond the directory specified in the bstrFolder or searchscope.txt. FALSE specifies that search should only use the directory specified in either the SearchScope.txt or the bstrFolder.
ListOfFoundDocuments
Specifies the documents found in the search.
iNumDocsFound
Specifies the number of documents found in the search.
varFileFilterOrText
Specifies a comma-separated list of file types to search (for example, *.par, *.asm).
PropertyList
Specifies up to three properties to match in the search. (Such as "Author", "Title", "SERevisedFrom", "Date", and so forth.)
ConditionList
Specifies conditions for the properties in PropertyList. Valid conditions are <, <=, =, >=, >, "where", and "contains."
PropertyValueList
Specifies values for the properties in PropertyList, relative to the conditions in ConditionList.
varNumProps
Specifies the number of properties in PropertyList. The variant must be based upon an integer.
varCheckModified
Specifies whether to search for properties modified within the past number of days specified by varNumberOfDays.
varNumberOfDays
Specifies the number of days within which modified properties are searched for. This argument must have value if varCheckModified has value.
ListOfTitles
Specifies the title of each document in the search results.
ListOfSubjects
Specifies the subject of each document in the search results.
ListOfModifiedDates
Specifies the modified date of each document in the search results.
Example
Imports RevisionManager
Imports System.Runtime.InteropServices

Module Example

    Sub Main()
        Dim objApplication As RevisionManager.Application = Nothing
        Dim bUseSearchScope As Boolean
        Dim bstrFolders As String
        Dim bIncludeSubFolders As Boolean
        Dim aListOfFoundDocuments As Object = Nothing
        Dim iNumDocsFound As Long ' out parameter
        Dim varFileFilterOrText As String
        Dim PropertyList(1) As Object
        Dim ConditionList(1) As Object
        Dim PropertyValueList(1) As Object
        Dim varNumProps As Integer
        Dim varCheckModified As Boolean
        Dim varNumberOfDays As Integer
        Dim aListOfTitles As Object = Nothing
        Dim aListOfSubjects As Object = Nothing
        Dim aListOfModifiedDates As Object = Nothing
        Dim returnValue As Long

        Try
            ' Start Revision Manager.
            objApplication = New RevisionManager.Application

            bUseSearchScope = True
            bstrFolders = ""
            bIncludeSubFolders = True
            'varFileFilterOrText = "*.asm,*.par,*.psm,*.pwd,*.dft"
            varFileFilterOrText = "*.par"
            PropertyList(0) = "SEStatus"
            ConditionList(0) = "="
            PropertyValueList(0) = "Available"
            varNumProps = 1
            varCheckModified = False
            varNumberOfDays = 5

            objApplication.SearchDocuments(bUseSearchScope, bstrFolders, _
                                            True, aListOfFoundDocuments, _
                                            iNumDocsFound, varFileFilterOrText, _
                                            PropertyList, ConditionList, _
                                            PropertyValueList, varNumProps, _
                                            varCheckModified, varNumberOfDays, _
                                            aListOfTitles, aListOfSubjects, _
                                            aListOfModifiedDates)
        Catch ex As Exception
            ' Write any errors to console.
            Console.WriteLine(ex.Message)
        Finally
            ' Release COM Objects.
            If Not (objApplication Is Nothing) Then
                objApplication.Quit()
                Marshal.ReleaseComObject(objApplication)
                objApplication = Nothing
            End If
        End Try
    End Sub

End Module
See Also

IRMgrApp Object  | IRMgrApp Members