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

How to highlight open paths?

Contributor ,
Feb 10, 2023 Feb 10, 2023

Copy link to clipboard

Copied

Is there any way or script to hightlight the open paths from the selected paths

TOPICS
Scripting

Views

1.4K

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

Community Expert , Feb 14, 2023 Feb 14, 2023

j.khakase, that may work in some cases, but it may also fail in other cases.

 

For example, below are two paths with arrowheads. One path is open, one is closed. Which one is the open path and which one the closed path according to the arrowhead proof?

 

a_p_001.png

 

You may get a more robust visual indicator by creating and applying a pattern brush that includes a start tile and an end tile (red arrowheads in the sample below). The start and end tiles would only appear on open paths.

 

a_p_002.png

 

On the other ha

...

Votes

Translate

Translate
Adobe
Mentor ,
Feb 10, 2023 Feb 10, 2023

Copy link to clipboard

Copied

Select Menu can do this, I think it's from Graffix... (it's free)

Votes

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
Community Expert ,
Feb 10, 2023 Feb 10, 2023

Copy link to clipboard

Copied

quote

Select Menu can do this, I think it's from Graffix... (it's free)


By @Met1

 

That's what I was about to write, but what Select Menu cannot do is highlight the open paths among a couple of selected paths. It could only select just the open paths.

So whether Select Menu is appropriate for this task depends on how exactly the question is meant.

Votes

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
Guide ,
Feb 11, 2023 Feb 11, 2023

Copy link to clipboard

Copied

This deselects closed paths in a selection, thereby leaving only open paths selected.

selectOpen(app.selection);
function selectOpen(items) {
    for (var i = 0; i < items.length; i++) {
        if (items[i].typename == "PathItem" &&
            items[i].closed == true) {
                items[i].selected = false;
        } else if (items[i].typename == "GroupItem") {
            selectOpen(items[i].pageItems);
        } else if (items[i].typename == "CompoundPathItem") {
            selectOpen(items[i].pathItems);
        }
    }
}

 

 

Votes

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
Contributor ,
Feb 12, 2023 Feb 12, 2023

Copy link to clipboard

Copied

I try this script nothing has happen

jkhakase_0-1676260882293.png

 

Votes

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
Community Expert ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

If deselecting the closed paths and then just selecting the open paths is an option for you: use the plugin Met1 mentioned. It's free. https://rj-graffix.com/downloads/plugins/

Votes

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
Contributor ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

Thank you for sharing the url, will look into it

Votes

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
Community Expert ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

@j.khakase 

you have three open paths. And three paths are selected. The script by @femkeblanco seems to work.

Votes

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
Community Expert ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

Your screenshot shows just three open paths, so Femke's script doesn't have to do anything, of course.

 

If you add some closed paths to the selection and run the script, you will see that it deselects all closed paths, leaving just the open paths selected.

 

Isn't that what you are looking for?

 

Votes

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
Contributor ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

yes, you are right. I try again but script not work in my case. any way I found a trick to find open paths, selecting path apply arrow head and it will show the open path as shown below image

 

jkhakase_0-1676362111065.png

 

Votes

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
Community Expert ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

Sorry, but you are on the wrong way.  Arrow heads cannot help you in that case!

Votes

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
Contributor ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

thank you so much, I understand now 

Votes

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
Community Expert ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

j.khakase, that may work in some cases, but it may also fail in other cases.

 

For example, below are two paths with arrowheads. One path is open, one is closed. Which one is the open path and which one the closed path according to the arrowhead proof?

 

a_p_001.png

 

You may get a more robust visual indicator by creating and applying a pattern brush that includes a start tile and an end tile (red arrowheads in the sample below). The start and end tiles would only appear on open paths.

 

a_p_002.png

 

On the other hand, you say that Femke's script does not work in your case. Perhaps you could provide a sample file, so one may have a look at it and check why it doesn't work.

 

Votes

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
Mentor ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

Ha, you learn something every day, I didn't know you could put arrowheads on closed paths!

Votes

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
Contributor ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

@pixxxelschubser @Kurt Gold you are right, I was wrong. I didn't notice that issue. Thank you so much for explaining the things.

@Kurt Gold sharing the script which I am using at https://drive.google.com/drive/folders/1WYAjKCvA-k5Q1YdJYkGUaASJUOGj7o9Z

Votes

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
Community Expert ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

LATEST

Thanks for providing the sample file, j.khakase.

 

But I didn't mean the script. I meant an Illustrator document that contains an illustration or a sketch with open and closed paths. A file in which you ran Femke's script to no avail. This way, one may figure out why it didn't work as expected.

 

Votes

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