Copy link to clipboard
Copied
Hello all,
I got the below script from the Adobe help community to the delete the pathitems by size. But, I am facing the prblem with the below script was its deleting only the path made of rectange, circle or polygonal with size 3.5 x 4.
Please the run the script in sample file and provide the solution for this. I am attaching the sample file.
var paths = app.activeDocument.layers["keyline"].pageItems;
for (var i = paths.length - 1; i > -1; i--) {
if (paths[i].width != 3.5 * 72 || paths[i].height != 4 * 72) {
paths[i].remove();
}
}
Copy link to clipboard
Copied
Sorry, the question is unclear. What do you expect the script to do which it is not doing?
Copy link to clipboard
Copied
Hi Femkeblanco,
Above script is no keeping all the PathItems with width 3.5 inch and height 4 inch.
Please open the attached "Sample.eps", in that there two pathitems with the width 3.5inch and height 4 inch.
What I need is , the two rectangles with size 3.5 x 4 inch need to be there in the file, only the small rectangle alone need to be deleted. But the blue rectangle also deleting while running the script.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Sorry, its working now. I think some problem on my system. Thanks