Copy link to clipboard
Copied
I need script to delete line with 2 anchor points another script to delete near by lines two scripts needed please help
thanks in advance
Regards
Lakshmiganth
Step through each pathitem and examine the length of it's pathPoints group. If the length is equal to 2 then use it's remove() method to delete it. For example (this is rought, off the top of my head):
var lines = new Array();
for (i = 0; i < app.activeDocument.pathItems.length; i++) {
if (app.activeDocument.pathItems.pathPoints.length == 2) {
lines.push(app.activeDocument.pathItems);
}
}
for (i = 0; i < lines.length; i++) {
lines.remove();
}
Copy link to clipboard
Copied
I am using CS5 and windows OS
Copy link to clipboard
Copied
Step through each pathitem and examine the length of it's pathPoints group. If the length is equal to 2 then use it's remove() method to delete it. For example (this is rought, off the top of my head):
var lines = new Array();
for (i = 0; i < app.activeDocument.pathItems.length; i++) {
if (app.activeDocument.pathItems.pathPoints.length == 2) {
lines.push(app.activeDocument.pathItems);
}
}
for (i = 0; i < lines.length; i++) {
lines.remove();
}
Copy link to clipboard
Copied
perfectly working thanks for the script great.... any script to delete near by line example if i select a line near by 1 or 2mm distance line surrounding should be deleted
once again thanks for the script...........
Regards
Lakshmiganth
Copy link to clipboard
Copied
Hi, can you post a screenshot showing the selected line and some other "near" lines that need to be deleted?
Copy link to clipboard
Copied
you can see lot of line nearby I will be selecting the line manually which I want and near by line should be deleted thanks for your support
Find more inspiration, events, and resources on the new Adobe Community
Explore Now