Skip to main content
Participating Frequently
August 7, 2018
Answered

Script to match size and position of foreground object with object behind it?

  • August 7, 2018
  • 1 reply
  • 1547 views

Is there a script that anyone here knows of to match a foreground object's size and position to that of the object behind it? Currently I have to copy x, y, width and height values from the background object and paste them into the respective fields of the foreground object to match them. Thank you!

This topic has been closed for replies.
Correct answer CarlosCanto

check Wundes copyToMultipleObjects script, his script deletes background object, so make a copy of it if you want to keep it.

GitHub - johnwun/js4ai: Collection of Javascripts for Adobe Illustrator

1 reply

Silly-V
Legend
August 7, 2018

This could work if we're working in a constrained scope of use - such as, there's got to be a grounding rule to help us determine which objects in the document are the background objects of what other objects.

Participating Frequently
August 7, 2018

Yes the process would be to select the two objects and run the script. Alternatively a copy/paste transform attributes would be cool too. Especially if it popped up with a box asking what of the transform attributes you wanted to paste/apply to your other object i.e. (paste x values and height, or paste x, y, width and height values or just the y and the height values etc)

CarlosCanto
Community Expert
CarlosCantoCommunity ExpertCorrect answer
Community Expert
August 8, 2018

check Wundes copyToMultipleObjects script, his script deletes background object, so make a copy of it if you want to keep it.

GitHub - johnwun/js4ai: Collection of Javascripts for Adobe Illustrator