checking closed path
- November 21, 2009
- 1 reply
- 1042 views
Hi Guys,
I am new to scripting, I am able to check the closed paths but I am struck in some problem.
Whenever I delete some segments from closed path and rejoin leaving a particular segment outside a newly made closed path, my script fails to recognize the opened path. have attached the screen shots.
In the second image after deleting the segment i am not able to recognize the path which is out segment that closed path.
Here is my code:
var thePathed = app.activeDocument;
for (var a = 0; a < thePathed.pathItems.length; a++)
{
app.activeDocument = thePathed;
var aPath = thePathed.pathItems;
for (var b = 0; b < aPath.subPathItems.length; b++)
{
if (aPath.subPathItems.closed == false)
{
alert("Error in Path Name: "+ aPath.name)
}
}
}
alert ("Path checking Finished")
Any suggestions on this is appreciable.
Thank you in advance.....
Regards,
Annesh MRD
