• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

176

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

Community Expert , 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();
}

Votes

Translate

Translate
Community Expert ,
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();
}

Votes

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

LATEST

Thank you. It works perfectly! 

 

Votes

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