Trouble with using CSV for SourceText AND using style.setFontSize together
I have a lot of text layers. I have two expressions working but they're not working together.
col = 0;
row = index - 1;
sl = thisComp.layer("CNTRL").effect("Text Size")("Slider");
txt = footage("Use Cases.csv").dataValue([col, row]);
text.sourceText.style.setFontSize(sl);
So, if this expression ends with the "style.setFontSize" command, then it ignores the text that it pulls from the CSV and defaults to the set sourcetext. But if it ends with "txt" then it pulls in the proper text from the CSV, but I have no control over the Font Size.
How can I get these two commands working together?
I've tried all sorts of rearranging. ChatGPT suggested this:
USC = text.sourceText instanceof TextDocument ? text.sourceText : new TextDocument("");
USC.text = txt;
USC = style.setFontSize(sl);
USC
but I don't know what it's referencing thinking that this is viable. The "instanceof" and "new" commands aren't something I've ever been aware of and they're definitely not working.
