Redifine scaling 100%

New Here ,
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.

Adobe Community Professional
Correct answer by brianp311 | Adobe Community Professional

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();
}
TOPICS
Scripting

Views

38

Likes

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

Redifine scaling 100%

New Here ,
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.

Adobe Community Professional
Correct answer by brianp311 | Adobe Community Professional

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();
}
TOPICS
Scripting

Views

39

Likes

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
Nov 25, 2020 0
Adobe Community Professional ,
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

Report

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

Copy link to clipboard

Copied

Thank you. It works perfectly! 

 

Likes

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
Reply
Loading...
Nov 26, 2020 0