cancel
Showing results for 
Search instead for 
Did you mean: 

Checking which window is in use - how to?

Phenom
Phenom

to all

 

I have just noticed that one of my nxopen code does not work if the user (i.e. me!) launches the program if not in the "main" window. I do not know the NX terminology for the NX windows, so for the discussion I will call :

  1. main window: the window where one "normally" works when in a sim or .fem (the display window?)
  2. the graph window: the window where one display graphs

the code open a dedicated GUI but if not in the main window it crashes out .Because of Try ..loop I do get the message that I put in the code - "Cannot find the dedicated GUI". I was in the graph window when I noticed that

 

so the question: Is there a way of checking which window is the active one?

 

Thanks

Regards

 

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)
1 REPLY

Re: Checking which window is in use - how to?

Siemens Phenom Siemens Phenom
Siemens Phenom

 

There is a WindowManager class under NXOpen.CAE.Xyplot, and it has methods to get all the windows, close a specific window, or create a new window, but it doesn't seem to have a method to report/obtain the current window.