Solid Edge Revision Manager Object Library
GetSharePointServerType Method
Specifies the URL file name for which the server type is returned.
Member of the SPServerType constant set that specifies the server type.
Description
This method returns the SharePoint server type for the specified file name.
Syntax
Visual Basic
Public Function GetSharePointServerType( _
   ByVal FileName As String, _
   ByRef SPServerType As SPServerType, _
   Optional ByRef bProcessChecks As Variant _
) As Long
Parameters
FileName
Specifies the URL file name for which the server type is returned.
SPServerType
ValueDescription
SERVER_TYPE_NOT_SHAREPOINT 
SHAREPOINT_V1_SERVER 
SHAREPOINT_V2_SERVER 
SHAREPOINT_V3_SERVER 
Member of the SPServerType constant set that specifies the server type.
bProcessChecks
Example
Imports RevisionManager
Imports System.Runtime.InteropServices

Module Example

    Sub Main()
        Dim objApplication As RevisionManager.Application = Nothing
        Dim objInsight As RevisionManager.Insight = Nothing
        Dim strFileName As String
        Dim SPServerType As RevisionManager.SPServerType

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

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

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

            objInsight.GetSharePointServerType(strFileName, SPServerType)

            Select Case SPServerType
                Case SPServerType.SERVER_TYPE_NOT_SHAREPOINT
                    ' SERVER_TYPE_NOT_SHAREPOINT.
                Case SPServerType.SHAREPOINT_V1_SERVER
                    ' SHAREPOINT_V1_SERVER.
                Case SPServerType.SHAREPOINT_V2_SERVER
                    ' SHAREPOINT_V2_SERVER.
            End Select

        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.