Start a new session from NX Open?
Start a new session from NX Open?
(OP)
Hi everybody!
Since first dipping my toe into the NX Open water, I always wondered if there was a way to start a new session from an NX Open stand-alone executable?
I know I can do
(The first call will start, let's say, Session 10 and then all subsequent calls will also get me this session.)
I just conducted a little experiment with a simple Journal:
When I manually start two instances of NX and then run the Journal from each of them - the session's tag always is 10.
I expected to get a different session (and thus tag) when running the Journal from the second instance.
To me it seems, that even when starting two UI instances, I still have only one session available through NX Open.
Is this the case? Or am I missing something?
If so, does somebody have deeper insight into sessions/UI sessions?
(Even starting a UI session from an NX Open executable (started via NX command line) would be very, very interesting!)
I'm really looking forward to your answers and hope I somehow made my question clear :)
Thanks in advance!
Marcus
Since first dipping my toe into the NX Open water, I always wondered if there was a way to start a new session from an NX Open stand-alone executable?
I know I can do
Session.GetSession()but this will always attach to the same session when starting multiple instances of my executable.
(The first call will start, let's say, Session 10 and then all subsequent calls will also get me this session.)
I just conducted a little experiment with a simple Journal:
Option Strict Off
Imports System
Imports System.Windows.Forms
Imports NXOpen
Module RenameToolboxParameters
Sub Main(ByVal args() As String)
MessageBox.Show(Session.GetSession().Tag.ToString())
End Sub
End Module When I manually start two instances of NX and then run the Journal from each of them - the session's tag always is 10.
I expected to get a different session (and thus tag) when running the Journal from the second instance.
To me it seems, that even when starting two UI instances, I still have only one session available through NX Open.
Is this the case? Or am I missing something?
If so, does somebody have deeper insight into sessions/UI sessions?
(Even starting a UI session from an NX Open executable (started via NX command line) would be very, very interesting!)
I'm really looking forward to your answers and hope I somehow made my question clear :)
Thanks in advance!
Marcus





RE: Start a new session from NX Open?
If you open 2 interactive NX sessions and create 2 parts, one in each, the objects in those parts could have the same Tags (I believe). So I think the Tags for the session object could also be the same.
I think what I'm trying to say is that Tags are only unique within an NX session.
Graham Inchley, Systems Developer, Sandvik Coromant. www.sandvik.com
HP EliteBook 8760w, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP4 64bit
Testing: NX9.0.2.5
RE: Start a new session from NX Open?
Thank you for pointing that out, maybe I just haven't found a way to tell them apart correctly...
I will definitely experiment with that a little more, but I'm still wondering if there is a way to force a new session/UI window into existence