Load a Selection from a Path using Javascript

LW
Posted By
Lars Wolff
Apr 6, 2006
Views
1151
Replies
2
Status
Closed
Hi!

I’m new to that NG – so: "HI" 🙂

I have to work over more then 500 Files, what i have to do is: open, load a selection from a given Path, copy the object, delete the background, save document.

Not really that problem using the great Javscript driven Scripting possibilities.

But now i got a problem at the point when i load the selection. With this two FOR-Loops i got every Point of the Path/Subpathes:

var xy = new Array();
for(var pis=0;pis<docRef.pathItems[0].subPathItems.length;pis++) { for(var
count=0;count< docRef.pathItems[0].subPathItems[pis].pathPoints.length;coun t++) {
xy[count] =
docRef.pathItems[0].subPathItems[pis].pathPoints[count].anch or; }
}

But i do not get the Bezier-Information, and my Object has curves…

May anyone know a easier Way to get a Selection from a given Path using Javascript, like the funktion in the UI "Create Workingpath" ???

Or is there a possibility to tell Javascript or the Selection Object "Use Bezier Information" ???

I haven’t found any documentation on the web 🙁 Is there a FAQ of this NG?

Thanks for your help!
Lars

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

LW
Lars Wolff
Apr 6, 2006
Hey there,
does nobody have an answer?
Thanks,
Lars

But now i got a problem at the point when i load the selection. With this two FOR-Loops i got every Point of the Path/Subpathes:
var xy = new Array();
for(var pis=0;pis<docRef.pathItems[0].subPathItems.length;pis++) { for(var
count=0;count< docRef.pathItems[0].subPathItems[pis].pathPoints.length;coun t++) {
xy[count] =
docRef.pathItems[0].subPathItems[pis].pathPoints[count].anch or; }
}

But i do not get the Bezier-Information, and my Object has curves…
May anyone know a easier Way to get a Selection from a given Path using Javascript, like the funktion in the UI "Create Workingpath" ???
Or is there a possibility to tell Javascript or the Selection Object "Use Bezier Information" ???
K
KatWoman
Apr 6, 2006
"Lars Wolff" wrote in message
Hey there,
does nobody have an answer?
Thanks,
Lars

But now i got a problem at the point when i load the selection. With this two FOR-Loops i got every Point of the Path/Subpathes:

var xy = new Array();
for(var pis=0;pis<docRef.pathItems[0].subPathItems.length;pis++) { for(var
count=0;count< docRef.pathItems[0].subPathItems[pis].pathPoints.length;coun t++) {
xy[count] =
docRef.pathItems[0].subPathItems[pis].pathPoints[count].anch or; }
}

But i do not get the Bezier-Information, and my Object has curves…
May anyone know a easier Way to get a Selection from a given Path using Javascript, like the funktion in the UI "Create Workingpath" ???
Or is there a possibility to tell Javascript or the Selection Object "Use Bezier Information" ???

I don’t
and HI to you too

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections