Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions AE CC 12.2 – Text Paragraph dimensions, How to retrieve them with script ?

  • AE CC 12.2 – Text Paragraph dimensions, How to retrieve them with script ?

    Posted by Shai Benshoshan on April 2, 2018 at 7:32 am

    I am trying to get the width and height of a paragraph text box. cc_2015.
    I can get the layer’s scale, or “undefined”.
    Thank you 🙂

    var myTextLayer = app.project.item(229).layer("text_segment 06").property("Transform").property("Scale");

    var myInfoText = myTextLayer.width;

    alert(myInfoText);

    Shai Benshoshan replied 8 years, 1 month ago 2 Members · 4 Replies
  • 4 Replies
  • Andrei Popa

    April 2, 2018 at 1:35 pm

    I think this was posted before. I think what you are looking for is
    myTextLayer.sourceRectAtTime(time,false).width

    Andrei
    My Envato portfolio.

  • Shai Benshoshan

    April 3, 2018 at 8:39 am

    thanks;
    Not Working on CC12 ( function undefined ) ;

  • Andrei Popa

    April 3, 2018 at 8:46 am

    Well, it was introduced in cc13. I don’t know of any other way. Sorry for the missunderstanding.

    Andrei
    My Envato portfolio.

  • Shai Benshoshan

    April 3, 2018 at 2:47 pm

    Found the answer :

    var t = app.project.item(49).layer(“text_001”).property(“Text”).property(“Source Text”);
    var e = t.value;
    var width = e.boxTextSize[0];
    var height = e.boxTextSize[1];

    thanks for your time ;
    shai

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