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

How to highlight open paths?

Engaged ,
Feb 10, 2023 Feb 10, 2023

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

TOPICS
Scripting
1.9K
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

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

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

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

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

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

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

 

 

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

I try this script nothing has happen

jkhakase_0-1676260882293.png

 

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

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/

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

Thank you for sharing the url, will look into it

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

@j.khakase 

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

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

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?

 

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

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

 

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

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

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

thank you so much, I understand now 

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 ,
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 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.

 

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

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

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

@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

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

 

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