Redifine scaling 100%

New Here ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

Hi all,

I'm not a pro, but can you please help me to understand what's wrong with this script? 

 

scaledElements = app.activeDocument.allPageItems;

for (i = 0; i < scaledElements.length; i++) {

    scaledElements.redefineScaling();

}

 

I'm trying to apply a "redifine scaling to 100%" to all document elements in one click.

Thank you in advance.

TOPICS
Scripting

Views

71

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Nov 25, 2020 Nov 25, 2020
You need to refer to each individual pageItem by using the for loop i counter, like so:  var scaledElements = app.activeDocument.allPageItems; for (i = 0; i < scaledElements.length; i++) { scaledElements[i].redefineScaling(); }

Likes

translate

Translate

Translate
Adobe Community Professional ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

You need to refer to each individual pageItem by using the for loop i counter, like so: 

var scaledElements = app.activeDocument.allPageItems;
for (i = 0; i < scaledElements.length; i++) {
    scaledElements[i].redefineScaling();
}

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

Thank you. It works perfectly! 

 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines