Graphics

 View Only
  • 1.  Datalinq text file, no delimiters?

    Posted 05-30-2013 15:27
    I am trying to set up a datalinq source that is a text file with no delimiters. It's coming from our weather computer to grab the current temperature for a time/temp bug. I did try using an RSS feed, but occasionally I would get random text on screen when the RSS feed updated (was a really long website address, which didn't look good!)...then I switched to an XML file on our weather computer, but that was only updated every 5 minutes with no option to increase the frequency, and we're stuck with the time/temp bug showing a temperature of 71 at the top of our show, yet we have a weather graphic on screen that shows it as 75. I found the main text file that our weather computer is pulling data from, and there is one row that contains ALL the weather data for our city, with no delimiters. It is set up where the first 4 characters of a row are the reporting station ID, followed by 55 characters for city name, 2 characters for state etc. so that the data is always in the same position for that row. I need to know how to have xpression look only at characters 88-90 for a row...is there any way to do that? Thanks!


  • 2.  RE: Datalinq text file, no delimiters?

    Posted 05-30-2013 23:05
    You could datalinq the row to a text object then attach a script to the text object that would just extract characters 88-90.

    You do this by rightclicking on the text object and choosing Edit Script Events.

    The script would be:

    text = Mid(text,88,3)

    Press F7 to compile the script and it should work.

    #XPression


  • 3.  RE: Datalinq text file, no delimiters?

    Posted 05-31-2013 15:18
    I tried that script, and my text object still had the entire line of text. Also another problem I ran in to, is that the line that contains the info I am looking for keeps changing depending on the length of other things before it. Is there a script that will look at the entire text file and find the line that starts with "KRFD" and pull from that? Thanks for the help!

    #XPression


  • 4.  RE: Datalinq text file, no delimiters?

    Posted 05-31-2013 19:10
    Not sure how you were testing it, but the script will only execute when the scene is either put online from the sequencer, or when the datalinq changes. You won't notice it if you simply double click the scene to put it online from layout mode.

    If the line isn't in a consistent place in the datalinq file, then I can't really think of any way to search for it, other than to write some sort of application (in Visual Basic for example) to extract the data that you are looking for.

    #XPression