65 Easily select all edges between specific node combinations to change arrow type - yEd Q&A
Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Easily select all edges between specific node combinations to change arrow type

0 votes
Hello

I have a map with many different nodes and edges.

I only want to change the two edges between three specific nodes that exist in that combination multiple times in the map. They currently exist as a filled arrow and I need to change those into unfilled arrows.

Is it possible to do that?
in Help by

1 Answer

0 votes
Well, if there are distinctive visual features for the two edges, you can use "Select Matching Elements" to select these edges and change them.
To use "Select Matching Elements" ...

1. Open the "Current Elements" palette section.
1.1 Find the specific edge style in that palette section that corresponds to your two edges.
1.2 Right-click said edge style to open its context menu.
1.3 Choose "Select Matching Elements".

In the "Current Elements" context menu of any node or edge style, there is also an entry "Configure Distinctive Features". "Configure Distinctive Features" will open a dialog  for configuring the distinctive features used for computing the representations in the section "Current Elements".
Choosing different features may help with distinguishing your two edges from other edges so "Select Matching Elements" will actually select only the edges you are interested in.

If there are custom properties in your diagram and your two edges can be identified by specific custom property values, you can use "Tools" -> "Select Elements" to select the desired edges.
To do that ...

2. Open "Tools" -> "Select Element".
2.1 On tab "General" turn on "Clear Selection First" and turn off the remaining options on that tab.
2.2 On tab "Edges" turn on "Use These Criteria" and set "Select" to "Data Property".
2.3 Set "Data Property" to the name of the custom property whose value should be matched and choose the remaining options such that the values that identify your two edges are matched.
2.4 Click "Ok".

If your two edges cannot be distinguished from the other edges through their style features or their custom property values, but only through the nodes to which they are connected, you can try to use the approach described above to select the three specific nodes instead. If you succeed to select those nodes, use "Select Elements" like so ...

3. Open "Tools" -> "Select Element".
3.1 On tab "General" turn on "Clear Selection First" and turn off the remaining options on that tab.
3.2 On tab "Edges" turn on "Use These Criteria" and set "Select" to "Selected Nodes Subgraph Edges".
3.3 Click "Ok".
by [yWorks] (164k points)
Hi Thomas

The edges are not unique so tried the nodes suggestion.

The "Selected Nodes" highlights all the edges connected to those nodes in only the nodes selected. First problem is that I only wanted the edges between those three and not the others connected to them. Second issue is that it only highlighted edges with the 3 nodes selected and left out the other patterns.

I was able to select the specific edges between the 3 nodes using "Selected node subgraph edges". But still have the problem of it not selecting the other patterns.

The 3 nodes together is a unique combination that occurs several times in the map. I was wondering if I could use their labels.
You are right, I should have recommended "Selected Nodes Subgraph Edges" instead of "Selected Nodes". I am sorry for the incorrect information. I have edited my answer with the correct suggestion. Thank you very much for pointing out this mistake.

I do not quite understand what you mean by "left out the other patterns".

As far as I understand your use case, you need to select a subset of your nodes. To do that, you need to find a property that all these nodes share, but none of the other nodes. However, what this property would be depends on your nodes and their properties. I.e. only you can determine the proper criterion that identifies the subset of nodes you are interested in.

It can happen that the criterion for identifying the subset of nodes is not supported in yEd's "Select Elements" tool or through yEd's "Select Matching Elements" action. In such a  case you can try to incrementally increase the set of selected nodes by repeatedly using the "Select Elements" tool with a simpler criterion and with "Act On Current Selection Only" and "Clear Selection First" turned off. If that does not work either, you probably need to select the individual nodes in your set manually.

Finally, I would like to answer your last question: Yes, it is possible to select nodes depending on their label texts. If you set "Select" to "Label", the "Select Elements" tool offers several ways to match label texts.

Hi Thomas

My use case is to select the two edges between three nodes. For example node A points to node C and node B points to node C. This pattern exists a few times in a larger network map. I want to change those edges alone.

I thought the design combination could be used but you noted it has to be a property that is unique. Individually there is no unique property but with the nodes A, B, C together they have a combined unique property. A is green, B is blue, C is dark blue. Plus the text is different. The presence of the arrows between A-C and B-C could add a unique quality to the group.

Is it possible to create a filter or some expression to use that unique combination? Or will it only work with individual properties and not the combined ones?

The label select works to find just the one node so wondering if there was a way to expand the options to add the other labels so effectively search for A, B, C together that will select those 3 if they appear together. But ultimately the edges are the ones I want to change.

Thanks again for the clarity.

yEd does not offer a way to search for structural patterns like "node A points to node C and node B points to node C". While this might be surprising at first glance, such a search is actually very difficult to implement, because it would mean solving the subgraph isomophism problem. We do not have an implementation for that and creating one for yEd is way out-of-scope for a free application.

Unfortunately, both "Edit" -> "Find" and "Tools" -> "Select Elements" only work for unique properties and do not support combined ones.

You can try to select nodes A, B, and C through their label texts even if these texts are different with "Match Text" option "Regular Expression". E.g. the regular expression [A|B|C] would select all the nodes whose label text is either "A" or "B" or "C" (without the quotes).

Hi Thomas

I think first using the "Match Text" option "Regular Expression" to select the nodes and then then going back in to select Edges - Selected nodes Subgraph edges works to highlight the edges alone in the selected nodes.

I have to double check to ensure that all the edges are selected but my quick test seems positive.

Thanks so much.

This is going to save me a lot of time and manual effort if it does work out fully.
Legal Disclosure | Privacy Policy
...