Announcement

Collapse
No announcement yet.

Setting datapool via Template Wizard script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting datapool via Template Wizard script

    Hi all,

    Anyone aware of the syntax for setting a datapool value using script in an inews template?

    I've seen a post using TrioCmd("trio:send_vizcmdMAIN_SCENE*FUNCTION*DataPool*Data SET yVal= 100") to do this but not able to get it to work correctly.

    I want to update dp values directly from inews template without using controls.

    Thanks

  • #2
    Is it a template in the newsroomsystem or via a template in Trio?
    You can do it somehow like this from a VTW Template in Trio, example of adding a score:

    Sub ButtonClick(Sender) 'DIRECT hometeam score up
    if HScore1.text="" then hScore1.text="0"
    HScore1.text = HScore1.Text+1
    temptext="trio:send_vizcmd_to_channel MyEngineChannelName SCENE*MyScenePath*FUNCTION*DataPool*Data SET MyVariable="+HScore1.text
    TrioCmd(temptext)
    End sub

    Comment


    • #3
      otherwise you can send a SharedMemory variable from a Newsroomtemplate to the engine instead of DataPool

      Comment


      • #4
        It's an inews template. We have a series of previously built scenes that only have only data-pool plugins for all the images and fonts and we are trying to avoid rebuilding the scenes with controls because of time constraints. I'm thinking a shortcut might be to have a script in TW update the data-pool since the info is coming from a database (the user is just selecting what info to update).

        I will try this out. Thanks for your help.

        Comment


        • #5
          are you trying to send the command from the Pilot Active X component in iNews? because if you do then this is not Trio command but rather VCP command.
          for example:
          Code:
          SendSingleCmd MyEngineChannelName SCENE*MyScenePath*FUNCTION*DataPool*Data SET MyVariable="+HScore1.text, false
          Code:
          SendSingleCmd IconServer,"REND*FUNCTION*DataPool*Data SET foo=0", false
          where IconServer is your inews preview host but you can also direct it to a specific engine
          you can chain several commands by using the buffer_put:
          Code:
          buffer_clear (always best to start clean)
          buffer_put "REND*FUNCTION*DataPool*Data SET foo=0"
          buffer_put "REND*FUNCTION*DataPool*Data SET faa=1"
          buffer_put "REND*FUNCTION*DataPool*Data SET fbb=2"
          buffer_send IconServer (or myvizhostname or ip address)

          Originally Posted by dwFisher View Post
          It's an inews template. We have a series of previously built scenes that only have only data-pool plugins for all the images and fonts and we are trying to avoid rebuilding the scenes with controls because of time constraints. I'm thinking a shortcut might be to have a script in TW update the data-pool since the info is coming from a database (the user is just selecting what info to update).

          I will try this out. Thanks for your help.

          Comment


          • #6

            and you can set multiple Datapool values with one command - separated by ';'

            Code:
            SendSingleCmd IconServer,"REND*FUNCTION*DataPool*Data SET foo=0; faa=1; fbb=2;", false
            or
            Code:
            buffer_put "REND*FUNCTION*DataPool*Data SET foo=0; faa=1; fbb=2;"

            Comment


            • #7
              Another option we've used to retrofit VCP controls to a scene that's already rigged with Datapools, is to add ControlDatapool plugins to the scene. This allows you to set Datapool value from a Control. You can simply add the ControlDatapool plugins at the top of the scene tree, you don't have add them to any specific place in the tree, so easy to do even for complex scenes.

              You do need to add ControlObject ids to your template, but no need for Viz commands in your Template.

              Comment

              Working...
              X