This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Joris Hoogendoorn
Posted Sep 13 - Read on Facebook

Hello Framer people,

Question about child layers of a copied layer;
I use "Entity = rel.Entity.copy()" to duplicate a sketch designed group called "Entity". I rename them in the same for loop to "Entity1, Entity2, ... etc".
The next thing i want to do is changing properties for child-layers inside my new Entities. But stuff like "Entity1.Basis.StrokeTop.y = 10" doesn't work...

I'm a framer beginner, so i do not have any clue...
Can someone see what i am doing wrong?

5 Comments

Jorn van Dijk

Welcome Joris! Super cool to see you come hang out here :) There's many ways to go about fixing this, give this thread a read and try to see if that makes sense to you: http://framergroup.com/posts/708301009296973.html

Jorn van Dijk

Couple of thoughts to get you going. A layer's name is not the same as its id. Check layer.id from the docs. Something you create in a for loop isn't in the global scope which makes it hard to target. Putting them in an array up front, like Benjamin does in this example is one way to fix that: https://www.facebook.com/groups/framerjs/permalink/708301009296973/?comment_id=708646029262471&comment_tracking=%7B%22tn%22%3A%22R4%22%7D

Jorn van Dijk

Final thing: search the community for answers! In this case I looked for "target layers in for loop" and the thread above came up. You can find it in the Framer welcome window or on the community page on the site. See you at the meetup wednesday?

Joris Hoogendoorn

Ah thanks! This makes sense! Great help.. I have to shuffle some stuff in my calender for wednesday, i'll let you know tomorrow morning!

Read the entire post on Facebook