Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Using Layer numbers to set effect parameters. “name.split” Help

  • Using Layer numbers to set effect parameters. “name.split” Help

  • Joe Wood

    April 6, 2021 at 3:30 am

    Hello all,

    I am in need of some expression help using the name.split expression. I have tons of circles in individual shape layers that are all labeled “CD_01”, “CD_02” and so on. I’m connecting them all with beam effect to draw lines between them. Each beam layer is labeled “CL_01”, “CL_02”.

    I’d like it so the position expression of the beam effect updates each time I duplicate the layer, to follow the next numbered circle that matches the number on the beam layer’s name.

    This is where I’m at right now, but I’m getting a Sytex error

    n = thisComp.layer(“CL_01”).name.split(“_”)[1];

    CD = thisComp.layer(“CD_” + n);


  • Joe Wood

    April 6, 2021 at 12:58 pm

    Got it to work like this:

    var num ="_")[1];

    var nam = thisComp.layer("CD_01").name.split("_")[0];

    var CD = thisComp.layer(nam +"_"+ num);


Viewing 1 - 2 of 2 posts

Log in to reply.

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