continuously update text from a excel file

What type of scripts do you need?

Moderator: byronnash

Post Reply
Sunjuro
Posts: 3
Joined: October 4th, 2005, 5:57 pm

Hi All,

I am doing a training video for bicycle racing. We have POV footage of a professional racer in an actual race. The rider was also hooked up to a computer that monitored many statistics throughout the race. The output from this computer is contained in an extremely large excel file.

The director wants these stats to be on the bottom of the screen during the entire 40 minute race. The stats are things like: Heart Rate, MPH, Percieved Effort, etc. so they are constantly changing throughout entire 40 minutes. To do this with keyframes would be insane, we would be talking about tens of thousands of keyframes.

So what I'm looking for is a way to apply an expression to a text layer to retrieve it's value from a excel file once a second.

Is this even remotely possible?

Thank you,

-sunjuro
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

If you can convert the excel file to a text file (in a format that a script can make sense out of) it shouldn't be too tough.

Dan
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

Yeah, we used tab separated values for our last big data>ae thing. Had to make a new windows association (like CSV, but TSV) but it was great.

"\t" is the delimiter for tabs.

Just build a basic parsing engine, convert the data to arrays of objects, and you're laughing.
Sunjuro
Posts: 3
Joined: October 4th, 2005, 5:57 pm

Sorry all, but I'm an expression newbe.

Let's say I can convert the .xls to a tab delineated txt file.

Can you tell me how to create an expression to retrieve data from it or point me to a website that explains it.

Thanks again,

-sunjuro
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

Ah, you can't do it with expressions.

Actually, you could, but it woiuld be very slow, and cumbersome, and you'd need the data in arrays within the expression field, and with that amount of data I imagine that AE would crash anyway.

The best way to do it is to learn to write scripts that read in the file, then split it up, then create keyframes, on the comps / layers / properties you specify.

Once you have an appropriate framework, you'll race through. It's probably good intermediate level scripting though, so if you're a beginner, I suggest you take a look at the AE Scripting Guide on the AE CD, and learn some basic concepts.

I don't really have any resources devoted to this kind of thing, but if you write any other languages, it shouldn't be too trecherous once you're used to the AE DOM and property-setting methods.

Good luck!
Dave
Sunjuro
Posts: 3
Joined: October 4th, 2005, 5:57 pm

Thanks Dave,

I'll look into scripts. At least I know what direction not to take.

-sunjuro
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

Sunjuro, take a look at this script I wrote. It looks at a text file and puts the data into AE. It's not exactly what you need but it has some concepts that can help you get started. Dan Ebberts had some stuff on his site that helped me too.
My script:
viewtopic.php?t=58

Dan's site:
http://www.motionscript.com
Post Reply