Skip to main content
j.khakase
Inspiring
February 10, 2023
Answered

How to highlight open paths?

  • February 10, 2023
  • 2 replies
  • 2401 views

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

This topic has been closed for replies.
Correct answer Kurt Gold

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

 

 


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?

 

 

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.

 

 

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.

 

2 replies

femkeblanco
Legend
February 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);
        }
    }
}

 

 

j.khakase
j.khakaseAuthor
Inspiring
February 13, 2023

I try this script nothing has happen

 

Monika Gause
Community Expert
Community Expert
February 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/

Met1
Legend
February 10, 2023

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

Monika Gause
Community Expert
Community Expert
February 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.