Solid Edge Framework Type Library
ValidateLogin Method
Specifies the UserName of the user to authenticate.
Specifies the password of the user to authenticate.
Specifies the group to which the user belongs. The default group is 'dba'.

Specifies the Role of the User in teamcenter.

Specifies the server name to which the user wants to connect.

Description
Validates the Login
Syntax
Visual Basic
Public Sub ValidateLogin( _
   ByVal bstrUserName As String, _
   ByVal bstrPassword As String, _
   ByVal bstrGroup As String, _
   ByVal bstrUserRole As String, _
   ByVal bstrDBUrl As String _
) 
Parameters
bstrUserName
Specifies the UserName of the user to authenticate.
bstrPassword
Specifies the password of the user to authenticate.
bstrGroup
Specifies the group to which the user belongs. The default group is 'dba'.
bstrUserRole

Specifies the Role of the User in teamcenter.

bstrDBUrl

Specifies the server name to which the user wants to connect.

Remarks
The behavior of the authentication process depends on the display_alerts flag. If the display_alerts flag is ON then user will see the Login dialog where he can directly type in his userName, password, group, userrole and DatabaseUrl to authenticate him. If the user provides the wrong information then the value of the hr will return as S_FALSE. If the value of the display_alerts flag is OFF, then Validatelogin () method will use the userName, password, group, user role and DatabaseUrl that is supplied, to login into teamcenter. But this time, no login dialog will be shown and the login will be done silently.
Example
Option Explicit

Sub Example()
    Dim objApplication As SolidEdgeFramework.Application
    Dim objTCE As SolidEdgeFramework.SolidEdgeTCE
    Dim UserName As String
    Dim Password As String
    Dim Group As String
    Dim Role As String
    Dim URL As String

    Set objApplication = GetObject(, "SolidEdge.Application")
    Set objTCE = objApplication.SolidEdgeTCE

    UserName = "username"
    Password = "password"
    Group = "Engineering"
    Role = "Designer"
    URL = "http://Servername:8085/tc"
    
    Call objTCE.ValidateLogin(UserName, Password, Group, Role, URL)

    If Not objApplication Is Nothing Then
        Call objApplication.Quit
    End If
    
    Set objTCE = Nothing
    Set objApplication = Nothing
End Sub
See Also

SolidEdgeTCE Object  | SolidEdgeTCE Members  | Solid Edge V19 - What's New