Announcement

Collapse
No announcement yet.

Sending Data to Shared Memory

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

  • #31
    One last question on this. Is there a way to trigger the data to populate in pilot with a button in template wizard?. This is mostly for preview purposes for the producer to see if the race items are correct.

    Comment


    • #32
      It depends on what method you used to load the shared memory data. If you used an animated button then It won't work on a preview server that only renders in singular frames. You can use OnPreview in that case to do a load. Can also try OnInit in the scene script
      Last edited by Novacane89; 06-06-2019, 08:56 AM.

      Comment


      • #33
        Hi Novacane,

        I used the animated button method. Basically it just needs to load the data to see if the correct content is there something a producer always needs. I will look into OnPreview and test OnInit. Do you have any scripts handy?

        Comment


        • #34
          Hi Shotski,

          Just copy your code used where it sets the shared memory to a font container... and paste it within a OnPreview Sub as well. I'm guessing since I don't have a preview server to test with.

          Let me know if it works for you
          Last edited by Novacane89; 06-11-2019, 09:06 AM.

          Comment


          • #35
            Hi Novacane,

            I tried putting the same scripting on the OnPreview but it did not work. Any other ideas?

            Shotski.

            Comment


            • #36
              Just as a test. Try using OnExecPerField. this.geometry.text = VizCommunication.map["test"].

              To optimize this you could use OnPreview to set a bool to true if Renderer is PreviewServer. Then in OnExecPerField you can do
              If PreviewBool is true and not this.geometry.text = VizCommunication.map["test"] then
              this.geometry.text = VizCommunication.map["test"].
              end if

              Comment


              • #37
                Hi Novacane,

                I will give this a try and report back. Thanks

                Comment


                • #38
                  Hi Novacane,

                  Still no luck with this yet. Will keep searching...

                  Shotski

                  Comment


                  • #39
                    Hey Shotski,

                    I might be able to test with a preview server next week as well. Will post my findings here.
                    Cheers

                    Comment


                    • #40
                      Thanks Novacane

                      Comment


                      • #41
                        Another question. The XML format for certain data has been changed. Instead of each item having its own node each item has the same node. Example of XML below:

                        With the structure i have set up for elections it only gets the first node. Is there a statement that i can use to get the remaining nodes? Is it using a FOR statement? I have attached the VIA file.

                        <root>
                        <SOURCE>NewsTicker</SOURCE>
                        <REPORT>Lottery</REPORT>
                        <RUN_DATE>Mon Jun 24 12:16:48 EDT 2019</RUN_DATE>
                        <DATA>
                        <Lottery>
                        <game_name>Powerball</game_name>
                        <results>03-06-11-14-66 (21)</results>
                        </Lottery>
                        <Lottery>
                        <game_name>Lotto with XTRA</game_name>
                        <results>13-14-18-29-32-49</results>
                        </Lottery>
                        <Lottery>
                        <game_name>Fantasy 5</game_name>
                        <results>04-20-26-27-33</results>
                        </Lottery>
                        <Lottery>
                        <game_name>Cash 3 Evening</game_name>
                        <results>0-6-7</results>
                        </Lottery>
                        <Lottery>
                        <game_name>Play 4 Midday</game_name>
                        <results>6-9-6-3</results>
                        </Lottery>
                        <Lottery>
                        <game_name>Cash 3 Midday</game_name>
                        <results>3-3-8</results>
                        </Lottery>
                        <Lottery>
                        <game_name>Lotto XTRA</game_name>
                        <results>04</results>
                        </Lottery>
                        <Lottery>
                        <game_name>Play 4 Evening</game_name>
                        <results>3-5-5-1</results>
                        </Lottery>
                        </DATA>
                        </root>
                        Attached Files

                        Comment


                        • #42
                          Hi Novacane,

                          I am trying to use the Console App you sent to read the data from the http instead of a text file. Is there a way to change that app or in the config of the app?

                          Thanks,
                          Shotski

                          Comment


                          • #43
                            Yes that console App is reading from the source file specified in the config, Just change the "Electiondata2019.xml" bit to whatever url you desire. The config file only holds 3 variables.
                            host | port | sourcefile.

                            I used the System.Xml; library in C# to read the nodes, When I have time I will work on a little concept that can has configurable node targets.

                            Comment


                            • #44
                              I can see it pushing the data but how do i get it to populate the template? This would be a way faster way than triggering it with a script button.

                              Comment

                              Working...
                              X