InstrSessionMgr.GetInstrSession
- Updated2026-02-03
- 1 minute(s) read
InstrSessionMgr.GetInstrSession
Syntax
InstrSessionMgr.GetInstrSession( name, newSession)
Return Value
Returns the instrument session you specify.
Purpose
Returns the instrument session you specify or creates the session if it does not already exist. For typical applications that use sessions that are valid only in-process, pass False as the newSession parameter for the server to return an existing session the application previously opened. Pass True as the newSession parameter when the application requires a new session independent of whether the application previously opened a session.
Remarks
IVI name resource descriptors are case sensitive and must match the entry in the IVI Configuration Store. All other instrument session names are case insensitive.
Parameters
name As String
[In] Pass the name of the session to return.
newSession As Boolean
[In] Pass False for Session Manager to return the existing session with the name you specify or, if no session exists, to create a new session with the specified name. Pass True for Session Manager to always create a new session whether a session with the name you specify already exists. Session Manager always appends a unique numeric suffix to the name you specify.