I have a large SVG with many Pieces, i want to make a selection by position.
How I can select only items width a specific position?
I mean bere in my code I have a for loop, this loop give me informations about x and y position of all elment in a document.
I want to save in another document, only element in a particular range.
(function () {
var doc = app.activeDocument;
for (var index = 0; index < 10; index++) {
var pos = doc.pathItems[index].position;
alert('1) X: ' + pos[0] + ', Y: ' + pos[1] );
}
Something like this:
If ( pos[0] < 10 and pos[1] > 1 and pos[0]>20 and pos[1]<10 ) {
group items
Save to another file.
}