Alias nodes


An alias is a copy of a node, referring to the same variable, module, or other object as the original node. It’s often useful to display an alias node in a different module than its original node. For example, if module M1 contains variable X, and X has outputs in another module M2, it’s often useful to add an alias of X in M2 to display the influence of X on its outputs explicitly. This makes it easy to draw arrows from X to or from other variables in M2.

A variable or other object can have only one original node, but an unlimited number of alias nodes.

Tip
An alias node is identified by its title being shown in italics.

You can create an alias directly with the Make alias command, or indirectly by drawing an arrow to or from a module node. These methods are described below.

Make Alias command: Select the original node. Then choose the Make Alias option from the Object menu (or press Control+m). The alias node appears next to the original node. You can then drag it into another module.

Chapter4 20.png

Draw arrow between variable and module: Draw an arrow from the original node to a module node, or from a module node to the original node. This creates an alias in the module. For example, draw an arrow from the variable Buying price to the module Cost to Buy.

Chapter4 21.png

It displays an arrow between the nodes.

Chapter4 22.png

Open up the module Cost to Buy to see the new alias.

Chapter4 23.png

Draw arrow between two modules: Draw an arrow from one module node Cost to Buy to another module Total Cost.

Chapter4 24.png

This creates a new variable node with a default name, such as Va1, in the first module Cost to Buy, with an alias of Va1 in the second module Total Cost.

Chapter4 25.png

An alias is like its original: An alias looks and behaves like its original node, except the fact that its label is in italics. You can select it, double-click it to open it Object window, move, resize, edit its label, and draw arrows to or from it, just like any other node. The alias and original show the same title — if you edit the title in one of them, it automatically changes in the other.

How alias and original can differ: On the other hand, the properties of the node — rather than the object that it depicts — can differ between the original and its alias. You can modify one node’s location (obviously) and size, its color (using the Tutorial: Color palette), and its styles using the Node Style dialog.

Tip
If an alias and its original node are in the same diagram, it displays any arrows to or from only the original node, not the alias. If the alias is in a different module, it displays arrows connecting it to other nodes in that module, as they would be displayed if it were the original node.

Input and output nodes are aliases: Input nodes and Output nodes are kinds of alias nodes that have special style properties.

See Also


Comments


You are not allowed to post comments.