You also have access to all the take item information by using the XPression Dashboard plugin that was added in 8.4. It installs with DB, so you probably already have it.
With that you can make much more interactive panels. I'm assuming your XP Studio is running, and it has a project that is open with take items in the Sequencer View.
Here is how:
1. Add your XP to the tree (see XPstep1 image), by using the Green Plus in the Basic Tree View. Enter the IP of the XP and give it a name (I called mine SpareXP).
2. In your panel, go to PanelBuilder mode, create a Basic Canvas, double click on it, and point its "openGear or XPression Datalinq" source to the XP. (see XPstep2 image).
3. Then in that canvas, you have access to all the parameters that are fed to us by the XP. You can drop one of those parameters right in the abs if you want.
1. For example, if you want the state of take item 10200, you can use the Param button (See XPstep3 image)
2. Drag a box in the canvas, and it will popup a list of the parameters.
2. Type "take" plus the takeid you care about, and it will filter the parameters for that take item.
3. You can then click on the state one, and click on "OK". You will probalby get an empty box, unless that take item is on air, since the state is empty (off air).
4. If you want to make a button that takes that item on air, you can create a button, and use visual logic to take the item on air (See XPstep4 image).
1. In the canvas, create a button.
2. Give it a name (if you want)
3. Click on Add to give it a task.
4. The XP should already be in your devices and parameters tree, open it up, and open up the "Commands" subtree.
5. Find the "Take" command and drag it into your script.
6. Enter the takeid for the item you want to take to air, and click on "OK", and get out of PanelBuilder mode.
When you click on the button, you should see the state go to "online" (assuming it goes online in XP).
5. You can react to that state changing and change your UI if you want to (i.e. change the color of a button, or a label, or something). For example, if you want the button to go from red to green when the state changes, you can do something like the following
1. Give your button an ID (see XPstep5). I gave mine an id of "takebutton".
2. Double click on the param that shows the state that we added in the last step 3 above.
3. Click on the Add to add a task. That task will trigger any time the parameter changes value. (see XPstep6 image for the next few steps).
4. In the Devices & Parameters tree, type in "take" + the takeid that you care about.
5. Find the "state" subparameter for that take item, and drag it on.
6. In the control and APIs type "if" into the search bar. Drag an if block on and connect it to your parameter, like in the picture. Also set the condition to "equals" and the input2 to "online".
7. Do the same thing again, searching for a "set style" block. Drag 2 of them on, set both of their ids as "takebutton", connect them like in the picture to the true and false of the "if" block, and set the style strings to set the bg, like in the picture (one to red, one to green).
8. Click on OK.
Once you have done that, when the state changes, your button should go from red to green.
This is just a small sample of what you could do. You could monitor for the state to be "paused" and change the button to be yellow. You can change the behaviour of the button based on the state (if it's offline, bring it online, otherwise, take it offline). Etc, etc. The sky's the limit.
Hopefully this was useful.
#DashBoard