Solid Edge Design Manager Object Library
SearchDocuments Method
DesignManager ActiveX DLL > Application Object : 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
Option Infer On

Imports System
Imports System.Runtime.InteropServices

Namespace Examples
    Friend Class Program
        <STAThread>
        Shared Sub Main(ByVal args() As String)
            Dim application As DesignManager.Application = Nothing
            Dim bUseSearchScope As Boolean = False
            Dim bstrFolders As String = Nothing
            Dim bIncludeSubFolders As Boolean = False
            Dim ListOfFoundDocuments As Object = Nothing
            Dim iNumDocsFound As Integer = 0
            Dim varFileFilterOrText As String = Nothing
            Dim PropertyList = New Object(0){}
            Dim ConditionList = New Object(0){}
            Dim PropertyValueList = New Object(0){}
            Dim varNumProps As Integer = 0
            Dim varCheckModified As Boolean = False
            Dim varNumberOfDays As Integer = 0
            Dim ListOfTitles As Object = Nothing
            Dim ListOfSubjects As Object = Nothing
            Dim ListOfModifiedDates As Object = Nothing
            Dim returnValue As Long = 0

            Try
                application = New DesignManager.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

                returnValue = application.SearchDocuments(bUseSearchScope, bstrFolders, bIncludeSubFolders, ListOfFoundDocuments, iNumDocsFound, varFileFilterOrText, PropertyList, ConditionList, PropertyValueList, varNumProps, varCheckModified, varNumberOfDays, ListOfTitles, ListOfSubjects, ListOfModifiedDates)

            Catch ex As System.Exception
                Console.WriteLine(ex)
            End Try
        End Sub
    End Class
End Namespace
using System;
using System.Runtime.InteropServices;

namespace Examples
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            DesignManager.Application application = null;
            bool bUseSearchScope = false;
            string bstrFolders = null;
            bool bIncludeSubFolders = false;
            object ListOfFoundDocuments = null;
            int iNumDocsFound = 0;
            string varFileFilterOrText = null;
            var PropertyList = new object[1];
            var ConditionList = new object[1];
            var PropertyValueList = new object[1];
            int varNumProps = 0;
            bool varCheckModified = false;
            int varNumberOfDays = 0;
            object ListOfTitles = null;
            object ListOfSubjects = null;
            object ListOfModifiedDates = null;
            long returnValue = 0;

            try
            {
                application = new DesignManager.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;

                returnValue = application.SearchDocuments(
                    bUseSearchScope,
                    bstrFolders,
                    bIncludeSubFolders,
                    out ListOfFoundDocuments,
                    out iNumDocsFound,
                    varFileFilterOrText,
                    PropertyList,
                    ConditionList,
                    PropertyValueList,
                    varNumProps,
                    varCheckModified,
                    varNumberOfDays,
                    out ListOfTitles,
                    out ListOfSubjects,
                    out ListOfModifiedDates);

            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
    }
}
See Also

Application Object  | Application Members