Solid Edge Revision Manager Object Library
FileExists Method
Specifies the URL path of the file.
Specifies whether the file exists.
Description
This read-only method returns whether the specified file exists.
Syntax
Visual Basic
Public Function FileExists( _
   ByVal FileUrl As String, _
   ByRef bFileExists As Boolean _
) As Long
Parameters
FileUrl
Specifies the URL path of the file.
bFileExists
Specifies whether the file exists.
Example
Imports RevisionManager
Imports System.Runtime.InteropServices

Module Example

    Sub Main()
        Dim objApplication As RevisionManager.Application = Nothing
        Dim objInsight As RevisionManager.Insight = Nothing
        Dim FileUrl As String
        Dim bFileExists As Boolean

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

            ' Get reference to Insight object.
            objInsight = objApplication.Insight

            FileUrl = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/Summit.par"

            objInsight.FileExists(FileUrl, bFileExists)

            If (bFileExists) Then
                ' File exists.
            End If

        Catch ex As Exception
            ' Write any errors to console.
            Console.WriteLine(ex.Message)
        Finally
            ' Release COM Objects.
            If Not (objInsight Is Nothing) Then
                Marshal.ReleaseComObject(objInsight)
                objInsight = Nothing
            End If

            If Not (objApplication Is Nothing) Then
                objApplication.Quit()
                Marshal.ReleaseComObject(objApplication)
                objApplication = Nothing
            End If
        End Try
    End Sub

End Module
See Also

Insight Object  | Insight Members

Send comments on this topic.