Summary

This block is used to add a node to an existing NavFile.


Implementation

  • Drag and drop the block from the palette
  • Link the "execute" action from the "executed" topic of the previous block


Example

In the example below, we will update the file created in the AddNavFile documentation.
In the "myNavFile.nav" located in the File space, we will add a new node to the node named "myNiagaraNetwork"
This new Node will be called "myNewNode", it will target the a Folder and it will have the Niagara "folder.png" icon

 

 Properties

  • Artifacts created by this block
    • Added: the path to the created node. Useful for following AddNodeToNavFile
  • TargetDirectory: The directory in which the NavFile will be created. 
  • FileName: The name of the NavFile. The file must exist.
  • DisplayName: The display name of the node to add. Slashes AREN'T allowed inside the displayName
  • TargetOrd: The ord of the component to target.
  • IconOrd: The ord to the icon of the node to add.
  • TargetNode: The path to the target Node. To target a Node which isn't at root level, you must put the names of all of its ascendants separated by /.
  • Policy {AddOnlyIfNotExists, AddAlways, AddOrMerge, AddOrReplace}: Define the behavior of the component to add if it already exists:
    • Add only if not exists: nothing will happen if a node already exists with the same name in the target node. More efficient, but won't update your nodes.
    • Add always:  The node will always be added in the target node, it will add a suffix number to the name if needed.
    • Add or merge: it will merge properties from the value to the existing node. 
    • Add or replace: the existing node is removed before the new one is added.


Behavior: DO

The Node is added to the target Node


Behavior: UNDO

The Node is removed