GetSessionID

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > PDMSystem >

GetSessionID

available from build: 20220208

Description

The command returns the operating system process ID of the current session of the PDM.

Remarks

The session ID is also available through the PDM user interface, in the About dialog: GetSessionID

Syntax

call DBWShell("GetSessionID")

Results

@SESSION_ID

The process ID of the current PDM session

Examples

VBS

'.x64

sub Main()
  DBWInit(TRUE)
  call DBWShell("GetSessionId")
  Id = DBWResult("@SESSION_ID")
  DBWMsgBox("Id: " & Id)
end Sub

.NET

'.x64

sub Main()
 DBWinit(TRUE)
 Set pDBWInit = CreateObject("MwPDMApi.Initialize")
 Set pDBWAppl = pDBWInit.StartConnection(DBWorksApplicationName)
 Id = pDBWAppl.PDMSystem.GetSessionId()
 DBWMsgBox("Id: " & Id)
 pDBWInit.EndConnection
end sub