Frame node

Revision as of 17:18, 20 April 2021 by Lchrisman (talk | contribs)

(New to Analytica 6.0)

A frame node is a component that is used for creating dashboards, especially in model user interfaces that are designed to be used on the Web from ACP. The frame node displays an edit table, result table, or result graph, and changes what is displayed as the user interacts with the model's UI. When you click the edit table button for a User input node that appears on the same diagram, the edit table appears in the frame node. When you click a result button for a User output node, the corresponding result table or graph appears in the frame node, replacing the previous content.

A common UI layout that is used with frame nodes is to have the user inputs and user outputs aligned along the left edge of the diagram, with the frame node on the right, as illustrated here:

Frame node UI 1.png

In this example, the button style in the Diagram Style dialog is set to Icon, so a calc button appears as VirtButtonCalc.png instead of CalcButton.png, etc. When you press the calc button for Emissions by plan, the result graph for that variable appears in the frame node.

Frame node UI 2.png

When you then click the edit table button for Driver scenarios, its edit table appears in the frame node.

Frame node UI 3.png

At each step, the frame node displays the most recently selected edit table or result. By reusing screen real estate in this way, it makes for a favorable user experience, especially when using a model in a web browser via ACP.

Two or more frame nodes

When you place two (or more) frame nodes on the same diagram, as shown here

Frame node UI 4.png

then the content alternates between them as you press input or output buttons.

Frame node UI 5.png

Creating a Frame node

To create a frame node (in desktop Analytica), first drag a text node to the diagram, then change its class to Frame node. You can do this in the Object window for the frame node

Frame node create in object window.png

or in the attribute pane with the frame node selected

Frame node create in attribute pane.png

After creating the node, make sure you resize it to be large enough to hold tables and graphs.

You'll also need to include some User input nodes or User output nodes on the same diagram, so that the user can select content.

Once you've created the frame node(s), the content will automatically appear in the frame node when you play your model in ACP. In desktop Analytica (as of Analytica 6.0), the content does not appear directly in the frame node by default, but edit table or result windows open directly over the frame node, which roughly simulates the ACP experience.

Side note: In desktop Analytica, the emded bit of the NodeInfo attribute controls whether content appears directly in frame nodes (as it also does in tall User input nodes and tall User output nodes). This bit is off by default in Analytica 6.0 due to the fact that the feature is still glitchy with some missing functionality in desktop Analytica. To turn on direct embedding in desktop Analytica, set the 11th field (the embed bit) or NodeInfo for the frame node object (if you want this to apply only to the one frame node), or in the NodeInfo for the FrameNode class object (if you want it to apply to all frame nodes in the model). To do this, open the Typescript window and view the current value:

> NodeInfo of FrameNode
1,0,0,0,,,,,,,,,0

Then copy that value, changing the 11th field to 1:

> NodeInfo of FrameNode : 1,0,0,0,,,,,,,1,,0

Scripting a Frame Node

Comments


You are not allowed to post comments.