Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

I need script to delete line with 2 anchor points another script to delete near by lines

New Here ,
Feb 28, 2011 Feb 28, 2011

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

TOPICS
Scripting
979
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Mar 01, 2011 Mar 01, 2011

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();

}

Translate
Adobe
New Here ,
Feb 28, 2011 Feb 28, 2011

I am using CS5 and windows OS

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 01, 2011 Mar 01, 2011

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();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2011 Mar 01, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2011 Mar 01, 2011

Hi, can you post a screenshot showing the selected line and some other "near" lines that need to be deleted?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 02, 2011 Mar 02, 2011
LATEST

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 supportquery.JPG

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines