Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions pulling text source as a file value

  • pulling text source as a file value

  • Andy Engelkemier

    May 14, 2021 at 6:43 pm

    I have a file in the project named Anniversaries.csv

    This code works:

    file = "Anniversaries.csv";
    col = effect("Column")("Slider");
    row = thisComp.layer("name").effect("Row")("Slider");
    footage(file).dataValue([col,row])

    But this does not:

    fileSource = thisComp.layer("csv").text.sourceText;
    file = fileSource;
    col = effect("Column")("Slider");
    row = thisComp.layer("name").effect("Row")("Slider");
    footage(file).dataValue([col,row])

    it’s pointing to a layer who’s source text is currently “Anniversaries.csv”

    It says it can’t find the footage named ‘”Anniversaries.csv”‘
    So it’s adding single quotes? I’m not much of a scripter/programmer, so I don’t understand how to fix this.

    The reason why, is sure to get asked. I’m changing that source text via the Essential Graphics panel so that I can make just a single comp for the next, which is 3 lines found in the 3 columns of that CSV file.

    But I have multiple CSV files, so want to be able to change them on the fly. Sure, I could combine them all into one, just like I could not do this at all and just manually type all 246 entries and animate them all one at a time. But lets agree that being able to call up a different CSV file makes sense in my case. Also, this would allow me to send this over to premiere as a mogrt if I wanted. (sorry, I seem to always get the answers that aren’t answers and telling me I should just do something differently, even thought it isn’t flexible and only works in this one specific case)

  • Andy Engelkemier

    May 14, 2021 at 6:50 pm

    Aaaand my programmer friend helped me figure it out.

    I had “Anniversaries.csv” as the source text. I just eliminated the quotes there and it fixed the problem.

    I didn’t think that would work because that makes it ‘Anniversaries.csv’ but I don’t understand when single or double quotations do what.

Viewing 1 - 2 of 2 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy