Exposing
an Output on a Localized Container
An output can be exposed on a localized Container An element that acts like a "box" or a "folder" into which other elements can be placed. It can be used to create hierarchical models. in four ways:
- Whenever you localize An action that you can apply to a Container that creates a separate scope for the elements in that Container. a Container, any outputs which are already referenced outside of the Container are automatically exposed.
- If you use the Link Cursor A special cursor for creating links invoked by double-clicking on an input or output object in a browser. to create a link from an output within a localized Container to a location outside of the Container, the output is automatically exposed.
- If you use the Insert Link
dialog (accessed by selecting Insert Link... from the context menu of an
input field) to create a link from an output within a localized Container to a
location outside of the Container, you will be prompted with a message asking if
you want to expose the output:
If you select Yes, the output is exposed. - You can manually expose an
output on a Container using the context menu for the output (accessed by
left-clicking on the output port and then right-clicking on the output in the
output interface).
The dialog lists all localized Containers containing the element (i.e., if the element is contained within nested localized Containers, all of the localized Containers are shown). The output can be exposed on any (or all) of the localized Containers in which it resides by clicking on the Container name. If the output is already exposed on a particular Container, a check will appear next to the Container name.
Once an output is exposed, it remains exposed even if the element to which it was originally linked is deleted. The only way to unexpose an output is to access the context menu for the output, and under the Expose Output option, clear the check mark (by clicking on it) for the Container.
Note: Because moving an element is implemented as a cut and paste operation, and this operation effectively deletes and then recreates the links, if the move involves localized Containers, situations can arise where GoldSim will not be able to recreate all of the links. This can occur, for example, if you move an element into a localized Container such that elements referencing its outputs can no longer see them, or if you move an element outside a localized Container that references an output inside that Container. In such cases, you will have to expose the outputs (and press F9) in order to recreate the links.
Once an output is exposed on a Container, it is displayed within an Exposed Outputs folder within the Insert Link dialog (accessed by right-clicking in an input field and selecting Insert Link.... For example, suppose that the variable X was exposed on the Container W. If you selected Insert Link... from an input field outside of the Container, you could select X from the Exposed Outputs folder:
Note that if the exposed output An output within a localized Container that can be referenced outside of the Container. has a defined alias The name by which an exposed output of a localized Container is referenced., this is shown first, followed by the element name in parentheses:
Similarly, when typing output names into an input field, GoldSim's link suggestion feature makes allows you to easily enter exposed outputs. In particular, if you wish to link to an exposed output of a localized Container, you can do so by typing a period after the name of the Container in the input field. The suggestion box will then list any exposed outputs that exist for that Container.