Load a Selection from a Path using Javascript

1151 views2 repliesLast post: 4/6/2006
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
#1
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" ???
#2
"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
#3