How to find two points shapes with no outline but filled with a color?

Explorer ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

There can be some two points shapes in file which have fill and do not have stroke (outline). It is a tiny lines which hardly visible as well as hard to detect if they are placed on edges of other objects. How to find such shapes? For example, a shape when someone used Line Segment Tool with applied fill and no stroke.

TOPICS
Feature request , How to , Scripting , Third party plugins , Tools

Views

124

Likes

Translate

Translate

Report

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

Advisor , Jan 19, 2022 Jan 19, 2022
I don't know if I understand you correctly.  This will select paths with two points, a fill and no stroke. app.selection = null; var paths = app.activeDocument.pathItems; for (var i = 0; i < paths.length; i++) { if (paths[i].pathPoints.length == 2 && paths[i].filled == true && paths[i].stroked == false) { paths[i].selected = true; } }

Likes

Translate

Translate
Adobe Community Professional ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

Object > Path > Clean Up...?

Likes

Translate

Translate

Report

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
Explorer ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

nope

Likes

Translate

Translate

Report

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
Advisor ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

I don't know if I understand you correctly.  This will select paths with two points, a fill and no stroke. 

app.selection = null;
var paths = app.activeDocument.pathItems;
for (var i = 0; i < paths.length; i++) {
    if (paths[i].pathPoints.length == 2
        && paths[i].filled == true
        && paths[i].stroked == false) {
        paths[i].selected = true;
    }
}

Likes

Translate

Translate

Report

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
Explorer ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

you understood perfectly
will those lines be printable (visible) when sending such a file to a postscript imagesetter?

Likes

Translate

Translate

Report

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
Advisor ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

I don't know the answer, but once selected, can they not be deleted or made invisible? 

Likes

Translate

Translate

Report

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
Explorer ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

I think it is safer to delete such shapes.

Likes

Translate

Translate

Report

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
Advisor ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

If they all the same unique color, find one, then use select → same fill...

Can't be that easy though right?

Likes

Translate

Translate

Report

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
Explorer ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

not shure, there can be a lot of objects with the same color and you may do not know where to find such shapes

Likes

Translate

Translate

Report

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
LEGEND ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

"Find same appearance" does not limit selection to "2-point" shapes. The script @femkeblanco shared DOES!

Likes

Translate

Translate

Report

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
Explorer ,
Jan 19, 2022 Jan 19, 2022

Copy link to clipboard

Copied

LATEST

if I uderstood you right, the above script DO limit selection to "2-point" shapes:

paths[i].pathPoints.length == 2

 

Likes

Translate

Translate

Report

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