<< Click to Display Table of Contents >> Components |
|
Like Macros, Components are reusable structures in a container. The primary difference is that a Component can have multiple outputs, whereas a Macro has a single output (like the return value of a function call). This makes a Component more suitable for structures like a balance sheet or profit and loss statement that may have several features of interest.
Creating a Component is much like creating a Macro or EntityType. You can create the component from scratch, or import it from another model.
Right-click the Component section in the Model Overview and choose New Component...
By default, the component has a blue background to distinguish it from other types.
Once you're in the new component, you can create structure with a subset of the drawing tools, or copy-paste existing structure into the component. While multiple diagrams are available, it's currently recommended that you restrict components to a single view.
You can also right-click the Component section in the Model Overview and choose Import Components... to select components to import from other models.
A Component is used to create part of an EntityType. The Component's equations become part of the entity's equation set, and can be customized as needed.
To include a Component in an EntityType definition, navigate to the entity's inspector and switch to the Components tab:
Then use the Include button at lower left to select a Component to use. The newly-included Component is added to the list, and a new diagram is added to the entity:
The first time you use a given Component, it's named after the source. If you include another instance of the same Component type, you will be prompted for a Prefix, to prevent naming collisions:
If you inspect the equation list in the host EntityType's inspector, you will find blocks of equation using the Component's prefix:
Once a Component is included, you are free to modify its equations as you would any other.
If you update the source Component's definition, the changes do not automatically propagate to the uses of the Component. However, you can return to the Component's instance in the entity's inspector and perform the update manually:
In so doing, you will lose customization of the included equations.