Facility Control

 View Only
  • 1.  Xpression panel setup keyboardshurtcut ?

    Posted 01-17-2019 12:40

    Is it possible to setup keyboard shortcut in the pre build xpressionpanel so Take can be set to "ENTER" and CUE to C ???



  • 2.  RE: Xpression panel setup keyboardshurtcut ?

    Posted 01-21-2019 19:43

    Hello,

    There is no way to add that keyboard shortcut to the existing XPression panel. We can kind of do a workaround to get it work though, by using our own custom panel.

    We can make our own custom panel that responds to keyboard shortcuts. To do that, we make buttons that have GPI triggers. Once you have created a button, if you double click on it, you can specify it's "Trigger ID" here ( I set mine to "ctrlshiftc"):



    Note that the trigger ID is just an arbitrary string, and has nothing to do with the keys that need to be pressed. I just called mine that so it was easy to remember when setting up the next steps. Then under Windows -> Preferences, you can add a "New Command" under "Keyboard Shortcuts":



    A popup will appear, and you can choose the "Fire GPI Trigger", and you can specify the shortcut:



    When you click on Next, you can specify the GPI Trigger ("crtlshiftc" in my case), and click on Finish.

    Once you have done that, any time you do the keyboard shortcut, the task for that button will trigger.

    Next, we'll create a custom panel that looks like the default XP one (in the next message).



    #DashBoard


  • 3.  RE: Xpression panel setup keyboardshurtcut ?

    Posted 01-21-2019 20:00

    Next, we need to create a custom panel that looks like the default XP one.

    In DB, in File -> New - > New CustomPanel File, pick a Blank Self-Contained Data Source Panel (XPression).

    Also open the default XP panel. Then grab the tab for your blank panel, and move it over to the right, so that the screen splits between your panel the the XPression one. Like this:



    Then, with the XPression default panel selected, click on "PanelBuilder Edit Mode" in the toolbar at the top. The color of your XPression panel should switch to have kind of a gray/green overlay on it. You can then drag and drop the sequencer list, the output status and the take item details widget over to your panel. Like this:


    This will give you a panel similar to the default one. You'll have to move and position the widgets as you see fit in your new panel.

    Also, the detail widget will not be connected to the list widget. In order to do that, we need to create a parameter to hold the takeid that is selected in the list widget. We will also use that parameter when doing the keyboard shortcuts.

    We will do that in the next message.


    #DashBoard


  • 4.  RE: Xpression panel setup keyboardshurtcut ?

    Posted 01-21-2019 20:34

    It's easier if our whole panel is pointed to the XP, rather than each of our individual widgets. In panel builder mode, "double click" on the panel anywhere that is empty. That will bring you to the Edit Component window, and it will have the top level abs selected. Like in the following image. You need to click on "configure", next to the openGear or XPression DataLinq check mark:



    Then choose the "Select a Device" radio, and select your XPression from the tree:



    Then hit OK, and apply and close.

    Then in edit mode, go to the "Source", and find all your "simplegrid"s that you added when dragged and dropped.

    Remove their contexttype, objectid, and objecttype. That is all handled by the top level one.



    You should have a simplegrid for each of the widgets you dragged and dropped in.

    Now we need to add the parameter for the selection. Add the following lines to the top of the file:

    <meta>
    <params>
    <param access="1" constraingtype="" name="selectedOID" oid="selectedOID" precision="0" type="INT32" value="0"/>
    </params>
    </meta>

    Like this:


    That will create the parameter in the panel.

    If you want to see if on screen, click on the "Param" button in the Edit Mode, select the one with the "+", drag and drop where you want the parameter, and in the popup, select the "selectionOID" parameter.

    That will drop it in your panel.


    #DashBoard


  • 5.  RE: Xpression panel setup keyboardshurtcut ?

    Posted 01-21-2019 20:43

    Next, in PanelBuilder Edit Mode, double click on your list widget. You should see its config options. Find the "selected param OID" field, and use "selectedOID" as it's entry.

    Now, when you select different items in your list, that parameter should automatically update to the take item you just selected.

    We can now use this to make buttons that cue or take the selected item. Let's make 2 buttons. They have the following definition:

    Button 1:

    <button buttontype="push" gpi="ctrlshiftc" height="54" left="63" name="doCue - CtrlShiftC" top="58" width="209">
    <task tasktype="ogscript">
    params.executeCommand("cmds.cue", {"takeid": params.getValue('selectedOID', 0)}, null);
    </task>
    </button>

    Button 2:

    <button buttontype="push" gpi="dotake" height="42" left="67" name="doTake - Ctrl-Enter" top="117" width="204">
    <task tasktype="ogscript">
    params.executeCommand("cmds.take", {"takeid": params.getValue('selectedOID', 0)}, null);
    </task>
    </button>

    If you click on the buttons, they will cue or take the selected item to air. If you don't want them visible in the panel, you can set their "visible" attribute to "false". They will still trigger via a GPI trigger even if they are invisible.

    You can then use the method in the first post I posted to trigger their GPI on keypresses. The first one has a gpi trigger of "ctrlshiftc", and the second one has "dotake".

    And that is how you can make your own panel that looks like the original XP panel, but responds to keyboard commands. Sorry for the extra long post. I wish there was a simpler way.


    #DashBoard


  • 6.  RE: Xpression panel setup keyboardshurtcut ?

    Posted 01-21-2019 20:44

    Also, if you want to connect your list widget to your detail widget, you can add the following code under the detail widget:

    <ogscript handles="onchange,onload" oid="selectedOID">var selectedValue = params.getValue( 'selectedOID', 0 );

    if (( selectedValue == null )||( selectedValue == "")){
    ogscript.hide( 'singleWidget' );
    return;
    }

    var widget =ogscript.getComponentsById( 'singleWidget' )[0];
    var param = widget.getConfigParam('Ext.CGTemp.TakeID', 0);
    param.setValue(selectedValue);

    ogscript.reveal( 'singleWidget', false );</ogscript>

    #DashBoard


  • 7.  RE: Xpression panel setup keyboardshurtcut ?

    Posted 01-23-2019 17:36
    Thanks i Will tryk it
    #DashBoard


  • 8.  RE: Xpression panel setup keyboardshurtcut ?

    Posted 01-25-2019 02:12
    Great thread! Thanks for all the info. I need to build something like this, but I don't know where to find the default XPression panel you're referencing. Where do I get it?
    #DashBoard


  • 9.  RE: Xpression panel setup keyboardshurtcut ?

    Posted 01-25-2019 14:12

    If you have DB 8.4 or later, click on the green plus in the Basic Tree View. You should have the option to add a new XPression.



    Your XPression also needs a specific license to work with the DashBoard XPression plugin. If you don't have that license, you can still add the XP, but you will get an error message when you try and open the panel.


    #DashBoard