Skip to main content
Known Participant
June 9, 2025
Question

Script to change layer visibility, resize and align

  • June 9, 2025
  • 1 reply
  • 229 views

Hey all,

  I've seen some amazingly helpful script posts (Like this one) and found some premade scipts like MatchObjects that get me close, but I figured I'd give it a try and see if anyone has any suggestions for combining a few different things.
I'm wanting to use Data Merge/Variables do the following:

  • Determine what shape I want visible and what fill (linked image) I want used.
  • Resize the fill layer to match either the length or width of the visible shape (F or B), whichever is larger, constraining proportions
  • Align the fill layer to the top, middle of the shape
  • Use the shape as a clipping mask
  • Copy the stroke colour of the shape to the clipping mask
  • Save each clipping mask individually

 

I'm not sure if I need my file structure different, like all F&B files in their own group or layer? Any advice or links to documentation is appreciated. I have found it hard to find articles or videos related to indepth data variable options.
Thanks!

 

 

1 reply

Known Participant
June 9, 2025

I should note that I'm using Illustrator CS6 , incase there are any new features that are incompatible