|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > PDMSystem > GetSessionID |
available from build: 20220208 |
The command returns the operating system process ID of the current session of the PDM.
The session ID is also available through the PDM user interface, in the About dialog: 
call DBWShell("GetSessionID")
@SESSION_ID |
The process ID of the current PDM session |
'.x64
sub Main()
DBWInit(TRUE)
call DBWShell("GetSessionId")
Id = DBWResult("@SESSION_ID")
DBWMsgBox("Id: " & Id)
end Sub
'.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