Source text

New Here ,
Feb 06, 2022 Feb 06, 2022

Copy link to clipboard

Copied

Is there an expression that links Source text from a specific row from another text layer?

TOPICS
Expressions

Views

57

Likes

Translate

Translate

Report

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

Adobe Community Professional , Feb 06, 2022 Feb 06, 2022
This should give you whichever line you set "n" to:txt = thisComp.layer("Text Layer").text.sourceText.split("\r"); n = 3; // get 3rd line if (txt.length >= n) txt[n-1] else ""

Likes

Translate

Translate
Adobe Community Professional ,
Feb 06, 2022 Feb 06, 2022

Copy link to clipboard

Copied

I am not sure what you are asking. You can easily repeat the text in any text layer using a simple pickwhip expression. What exactly are you trying to accomplish? What do you mean when you say "another row?"

Likes

Translate

Translate

Report

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
New Here ,
Feb 06, 2022 Feb 06, 2022

Copy link to clipboard

Copied

Hi Rick
Thanks a lot for replying,
I have a text layer that consistes of about 30 lines, each line is a diffreant word.
I need to connect a new text layer to a specific line in the "master" text layer.
Let's say the master layer is:
"Retail store

Architect

Real estate"

I want to connect the source text of a new layer to just one of the lines
that way any new layer with this expression will update from the master text layer to a specific line.
so the end result will give me 3 difreant text layers for Retail store ,Architect, Real estate

Thanks

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Feb 06, 2022 Feb 06, 2022

Copy link to clipboard

Copied

This should give you whichever line you set "n" to:

txt = thisComp.layer("Text Layer").text.sourceText.split("\r");
n = 3; // get 3rd line
if (txt.length >= n)
  txt[n-1]
else
  ""
  

Likes

Translate

Translate

Report

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
New Here ,
Feb 06, 2022 Feb 06, 2022

Copy link to clipboard

Copied

LATEST

Worked like a charm!
Thanks a lot Dan. 

Likes

Translate

Translate

Report

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