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

How to select all ASSOCIATED nodes on a directed graph?

+1 vote

From node 6...

Neighborhood: 6, 4, 7, 12

Predecessors: 6, 3, 4

Successors: 6, 7, 12

Is there a way to select the entire right graph by just selecting node 6 alone?  Basically, all the edges that are connected regardless of direction.

 

 

in Help by

1 Answer

+1 vote

Yes, there is.

Use "Tools" -> "Select Elements" with option "Use These Criteria" on tab "Nodes" marked (make sure this option is not marked for any of the other tabs) and "Select" set to "Neighbors of Selected Nodes" as well as "Maximal Path Distance" set to a large value (if in doubt use the node count of your diagram).

If you want to select the edges of the subgraph instead of the nodes, run "Select Elements" a second time with option "Use These Criteria" on tab "Edges" marked and "Select" set to "Selected Nodes".

by [yWorks] (161k points)
edited by
Thanks Thomas.  As an amendment to the original question, what is the impact of groups?  For example.... Node6/7/12 are in Group1 and Node4 has an edge to Group1.  If I select Node6, it would only select the group by nothing outside of it.

Similar to the approach for selecting subgraph edges, try running "Select Elements" multiple times. If you have "Clear Selection First" on tab "General" not marked, you will be able to incrementally increase the set of selected nodes with each run. Moreover, the selection criteria "Parents of Selected Nodes" and "Children of Selected Nodes" will allow you to select parent groups or child nodes.

E.g. for the amended example, the following approach should work:

  1. Run as explained above with "Clear Selection First" not marked.
  2. Run again with "Select" set to "Parents of Selected Nodes".
  3. Run again with "Select" set  to "Neighbors of Selected Nodes".

For more complex nesting structures, you will have to mix and match the criteria "Neighbors of Selected Nodes", "Parents of Selected Nodes", and "Children of Selected Nodes".

Legal Disclosure | Privacy Policy
...