Display some different kind of node

Suppose you have a set of node of type A and another set of type B.

What’s the simplest way to display (or hide) all the A-nodes or B-Nodes or A&B-nodes (with associated links)?

Should I use layername capabilities ? But how saying “display A-nodes” ?


I would iterate over all of the Diagram.Nodes of the desired type and set the Part.Visible property appropriately.

Ok, It is the algorithm I made,

I’ve just wanted to know if there exists a more clever idea.