Solid Edge Revision Manager Object Library
IsFileCheckedOut Method
Specifies the URL path to the file for which you want to determine status.
Specifies whether the specified file is checked out.
Specifies the user name to which the specified file is checked out.
Description
This method returns the check out status of the specified file.
Syntax
Visual Basic
Public Function IsFileCheckedOut( _
   ByVal FileUrl As String, _
   ByRef bFileIsCheckedOut As Boolean, _
   ByRef UserName As String _
) As Long
Parameters
FileUrl
Specifies the URL path to the file for which you want to determine status.
bFileIsCheckedOut
Specifies whether the specified file is checked out.
UserName
Specifies the user name to which the specified file is checked out.
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 bFileIsCheckedOut As Boolean
        Dim UserName As String = String.Empty

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

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

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

            objInsight.IsFileCheckedOut(FileUrl, bFileIsCheckedOut, UserName)

            If (bFileIsCheckedOut) Then
                ' File is checked out to UserName
            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.