Reusable Node Groups

Video Transcript

A Reusable Node Group is created like an Agent, but when you drag an instance from the Project Tree to a node editor, a full copy of the nodes on the node screen are created and exposed by a node. You can think of this as creating a node definition with other nodes.

When editing a Reusable Node Group, there is no refresh rate selection like there would be when editing an Agent. In its place is a save button that when pressed refreshes all nodes that expose an instance of the group. All nodes in a Reusable Group execute at the refresh rate of the Agent they are dragged onto.

Reusable Node Groups are a good way to avoid duplicate groups of nodes in your project to keep it clean and easier to maintain. They are also a good tool to make your Agents more readable. For example on this Agent these three nodes work together. The Above Or Below node turns on and off a Timer when the input goes above or below 0.5. The Timer fires an Incrementor whos output activation is used to control an LED. Select the three nodes and press Control + G to move those nodes to a new node group. Rename the Node Group Timed Increment to make it clear what the node is for. Double click the new node to open the node group for editing. Notice that the inputs and outputs that were connected to other nodes have been automatically set as exposed. You can expose any other IO that you want and press the Save and Update Instances button to update the new node.

An important point to remember is that when you are editing a Reusable Node Group, you are editing the template, not any of the instances. You won’t be seeing live data from any of the instances, for example the input activation on the Above or Below node has a connection on the Agent but here in the editor it shows it is not connected and you can manually change the activation value.