<xml> </xml>

SOLIDWORKS PDM Professional API Help | Send Feedback
GetFirstResult Method (IEdmSearch5)
See Also

Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: Visual Basic Language Filter: C# Language Filter: C++/CLI

EPDM.Interop.epdm Namespace > IEdmSearch5 Interface : GetFirstResult Method (IEdmSearch5)

Visual Basic
C#
C++/CLI
Gets the first file or folder that matches the search criteria.

# Syntax

Visual Basic |
--- | ---

    Function GetFirstResult() As IEdmSearchResult5

C# |
--- | ---

    IEdmSearchResult5 GetFirstResult()

C++/CLI |
--- | ---

    IEdmSearchResult5^ GetFirstResult();

#### Return Value

IEdmSearchResult5; Nothing or null if no files or folders match the search criteria or there are syntax errors in search conditions (see Remarks)

# Example

See the IEdmSearch5 and IEdmSearch9 examples.

# Remarks

If the search object was obtained using IEdmVault21::CreateSearch2 (IEdmSearch9) then this method's return of Nothing or null can mean either:

- the search found no documents,

- or -

- there are one or more search condition syntax errrors. Call IEdmSearch9::GetSyntaxErrors to determine whether there are syntax errors. If IEdmSearch9::GetSyntaxErrors returns Nothing or null, then you can assume that this method returned Nothing or null because the search found no documents. See Search Syntax.

After calling this method, call IEdmSearch5::GetNextResult to retrieve the rest of the files and folders that match the search criteria.

C++ users must release the returned interface, IEdmSearchResult5.

Return codes:

- S_OK: The method successfully executed.
- S_FALSE: The method successfully executed, but no files or folders match the search criteria.

# See Also

####

IEdmSearch5 Interface
IEdmSearch5 Members

# Availability

SOLIDWORKS PDM Professional Version 5.2