Form modules


4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3  •  6.4  •  6.5

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:

  1. Make sure a diagram window is active with the edit tool selected.
  2. Drag the module icon from the node toolbar and position it in the diagram.
  3. Type in a title for the module — for example, User interface.
  4. Open the Attribute panel at the bottom of the diagram window.
  5. With the new form module still selected, press to open the Attribute dropdown menu, and select Class.
  6. The class Module appears in the Attribute panel. Press to open a popup menu of module classes.
    Chapter9 14.png
  7. 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:

  1. 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.
  2. In the toolbar, be sure you are in edit mode (ToolbarEditModeButton.png).
  3. 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.
  4. 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.
  5. When you have finished creating input and output nodes, double-click the form node to open its diagram window.
  6. 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.

See Also


You are not allowed to post comments.