Determine alias version of screen

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Determine alias version of screen

Post by AMitchneck »

I have a screen which displays information about several machines depending on which alias is loaded. How can I determine which alias is currently loading in scripting? I have some background script which changes is job priority based on which machine you are actively looking at (to reduce update delays, etc.).
Along this note, I would like to add a 1/2/3/... at the top of the screen to indicate which machine number is actively being watched.

Thank you.
Adam M.
Controls Engineer
FlexEnergy

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Determine alias version of screen

Post by mark.monroe »

You can get the alias instance currently loaded on a screen by doing the following.

Code: Select all

string instanceName = this.InstanceName;
You would need to figure out how you want to trigger the above code. I would trigger when you change the screen alias.

To change the alias instance a screen is using.

Code: Select all

//Instance1 is the instance I want my screen to use
Globals.Screen1.Instance1.Show();
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply