Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Link Property to Source Text

Explorer ,
Jun 01, 2023 Jun 01, 2023

TL;DR I need to know if & how I can make a property in a shape layer equal the numeric source text of a text layer. I want the number in that text box to then also become the trim paths "start" value.

 

I believe it is essential that the master source of the number be the source text of the text layer -- I am creating a bunch of videos from a single template using CompsFromSpreadsheet, which enables me to specify replacement text for different layers using that spreadsheet. These layers will contain percentages which I want to display as text and have reflected in a pie chart (which relies on trim paths).

 

So, ideally, I would be able to link the Start value directly to the number in the text box in some way.

 

Alternatively, I could have the value pull from a spreadsheet as well. I'm aware that there are ways to pull values from a .csv file in AE, however, in this case there will be hundreds of new comps generated at once (by compsFromSpreadsheet) and I don't know how I could have those comps each reference the correct cells in the spreadsheet to find the correct values. CompsFromSpreadsheet will be giving each of these new comps a name -- is there a way I could say "Start value for Shape Layer 1 equals Row[name of comp],Column 586", for example?

 

(Using AE version 23.4)

TOPICS
Expressions , How to , Scripting
282
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 01, 2023 Jun 01, 2023

Something like this, probably:

txt = thisComp.layer("Text").text.sourceText;
parseFloat(txt)
Translate
Community Expert ,
Jun 01, 2023 Jun 01, 2023

Something like this, probably:

txt = thisComp.layer("Text").text.sourceText;
parseFloat(txt)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 02, 2023 Jun 02, 2023
LATEST

Thank you so much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines