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 :
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?
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.