Copy link to clipboard
Copied
Is there an expression that links Source text from a specific row from another text layer?
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
""
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?"
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
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
""
Copy link to clipboard
Copied
Worked like a charm!
Thanks a lot Dan.