Hello, i need to disable autofit to every page items but its not working.

Nov 24, 2020

Copy link to clipboard

Copied

try {
	   var allPIs = app.activeDocument.allPageItems;
       for(var i=0;i<allPIs.length;i++){
            if (allPIs[i].frameFittingOptions.autoFit == true) allPIs[i].frameFittingOptions.autoFit = false;
       }
        alert("Delete ALL AutoFit Page Items");
	} catch (e) {alert(e + ' at line ' + e.line);}

im using INDD CS5.5, and i have a group with 1 text frame and 3 polygons, 

when i try to disable autofit to every page item its not working, 

but when i ungroup, its worked.

 

sorry, i figured this one out.

because group contain all other pageitem then just need to use a simple if then to get rid of group.

TOPICS
Scripting

Views

32

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

Hello, i need to disable autofit to every page items but its not working.

Nov 24, 2020

Copy link to clipboard

Copied

try {
	   var allPIs = app.activeDocument.allPageItems;
       for(var i=0;i<allPIs.length;i++){
            if (allPIs[i].frameFittingOptions.autoFit == true) allPIs[i].frameFittingOptions.autoFit = false;
       }
        alert("Delete ALL AutoFit Page Items");
	} catch (e) {alert(e + ' at line ' + e.line);}

im using INDD CS5.5, and i have a group with 1 text frame and 3 polygons, 

when i try to disable autofit to every page item its not working, 

but when i ungroup, its worked.

 

sorry, i figured this one out.

because group contain all other pageitem then just need to use a simple if then to get rid of group.

TOPICS
Scripting

Views

33

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 24, 2020 0
Nov 24, 2020

Copy link to clipboard

Copied

sorry, i figured this one out.

because group contain all other pageitem then just need to use a simple if then to get rid of group.

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 24, 2020 0