Solid Edge Framework Type Library
GetTeamcenterVersion Method
This parameter will provide user with major version of Teamcenter. E.g. – TC9, TC10 and so on.
This parameter will provide user with complete version of Teamcenter. E.g. – V10000.1.0.22_20140915.00
Description
Get the Major and Complete Teamcenter version on which user is working.
Syntax
Visual Basic
Public Sub GetTeamcenterVersion( _
   ByRef bstrMajorVersion As String, _
   ByRef bstrCompleteVersion As String _
) 
Parameters
bstrMajorVersion
This parameter will provide user with major version of Teamcenter. E.g. – TC9, TC10 and so on.
bstrCompleteVersion
This parameter will provide user with complete version of Teamcenter. E.g. – V10000.1.0.22_20140915.00
Example
Imports System.Runtime.InteropServices

Public Class Form1

    Private Sub GetTeamcenterVersion_Click(sender As Object, e As EventArgs) Handles GetTeamcenterVersion.Click
        Dim objSEApplication As SolidEdgeFramework.Application = Nothing
        Dim objTCE As SolidEdgeFramework.SolidEdgeTCE = Nothing
        Dim majorVersion As Object = Nothing
        Dim completeVersion As Object = Nothing
        Dim UserName As String
        Dim Password As String
        Dim Group As String
        Dim Role As String
        Dim URL As String
        Dim bTeamCenterMode As Boolean
        Try
            objSEApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objSEApplication.DisplayAlerts = False

            objTCE = objSEApplication.SolidEdgeTCE
            Call objTCE.GetTeamCenterMode(bTeamCenterMode)
            If bTeamCenterMode = False Then
                objTCE.SetTeamCenterMode(True)
            End If
            'Specify Server Credentials
            UserName = "abc"
            Password = "abc"
            Group = ""
            Role = ""
            URL = "http://Servername:8085/tc"

            Call objTCE.ValidateLogin(UserName, Password, Group, Role, URL)
            objTCE.GetTeamcenterVersion(majorVersion, completeVersion)
            MsgBox("Major Version is " & majorVersion & vbNewLine & "Complete Version is " & completeVersion)

        Catch ex As Exception
            MsgBox(ex.ToString)
            Clipboard.SetText(ex.ToString)
        End Try
    End Sub
End Class
See Also

SolidEdgeTCE Object  | SolidEdgeTCE Members