Skip to main content
TestriteVisual
Inspiring
January 20, 2023
Question

Is there a way to scale up a bunch of rectangles in the x or y direction by the same delta value?

  • January 20, 2023
  • 1 reply
  • 163 views

Greetings,

I would like to be able to grab different size rectangles at the same time and scale them all up by +5 inches in the Height (y-direction), instead of having to click on each rectangle one by one. How can this be done? Thanks for your help.

This topic has been closed for replies.

1 reply

rob day
Community Expert
Community Expert
January 20, 2023

Hi @TestriteVisual , I think you would have to use a script. try this:

 

 

app.scriptPreferences.measurementUnit = MeasurementUnits.INCHES;
var h = 5;
var s = app.activeDocument.selection
var b;
for (var i = 0; i < s.length; i++){
    if (s[i].constructor.name == "Rectangle") {
        b= s[i].geometricBounds
        s[i].geometricBounds = [b[0],b[1],b[0]+h, b[3]]
    } 
};   
app.scriptPreferences.measurementUnit = AutoEnum.AUTO_VALUE;