Imports System.Runtime.InteropServices
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim objApplication As SolidEdgeFramework.Application = Nothing
Dim ObjSEEC As SolidEdgeFramework.SolidEdgeTCE = Nothing
Dim CurrentUserName As String
Try
objApplication = Marshal.GetActiveObject("SolidEdge.Application")
ObjSEEC = objApplication.SolidEdgeTCE
CurrentUserName = ""
Call ObjSEEC.GetCurrentUserName(CurrentUserName)
MsgBox(CurrentUserName)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
End Class