• • 5.1 • •
It is often helpful to group input and output nodes into a single diagram for easy access by model users. The form module makes it easy for you to create input and output nodes in the form by drawing arrows between the form and variables.
Creating a form module:
- Make sure a diagram window is active with the edit tool selected.
- Drag the module icon from the node toolbar and position it in the diagram.
- Type in a title for the module — for example,
- Open the Attribute panel at the bottom of the diagram window.
- With the new form module still selected, press to open the Attribute dropdown menu, and select Class.
- The class Module appears in the Attribute panel. Press to open a popup menu of module classes.
- Select Form from the menu.
Creating input and output nodes in a form module: An input or output node is an alias to another variable in the model. Creating an input or output node is similar to creating an alias node. To create a set of input and/or output nodes in the form module:
- Adjust the diagram(s) on your screen so the form node and the source variables for the input or output nodes are all visible — they might be in the same or different diagrams.
- In the toolbar, be sure you are in edit mode ().
- To create an input node for variable X, draw an arrow from the form node to X. It creates an input node for X inside the form module.
- To create an output node for variable Y, draw an arrow from Y to the form node. It creates an output node for Y inside the form module.
- When you have finished creating input and output nodes, double-click the form node to open its diagram window.
- Rearrange and resize the input and output nodes for clarity. It is sometimes clearest to arrange the input nodes on the left side and the output nodes on the right side.
A form module is like any other module, except when you draw arrows into or out of a form module, it creates outputs or inputs, instead of normal alias nodes in the module. But, you can also create standard variables and modules inside a form. If you have too many nodes to fit comfort- ably in a single diagram, you might wish to organize them into additional modules (which need not be forms) to enclose related groups of inputs and outputs.