Difference between revisions of "AcpStyles"

Line 9: Line 9:
 
The easiest way to set most of these styles and options is to use the [[ACP Style Library]].  Select '''Add Library...''' from the '''File''' menu and select the  [[ACP Style Library]] to add into your model. This library lets you interactively select most ACP styles and options for Navigation, Frames and nodes using menus and checkboxes and menus. If you make choose configurations while running the model in ACP, you can see their effects immediately in your model.   
 
The easiest way to set most of these styles and options is to use the [[ACP Style Library]].  Select '''Add Library...''' from the '''File''' menu and select the  [[ACP Style Library]] to add into your model. This library lets you interactively select most ACP styles and options for Navigation, Frames and nodes using menus and checkboxes and menus. If you make choose configurations while running the model in ACP, you can see their effects immediately in your model.   
  
Using [[ACP Style Library]] you don't need to understand the details below. This page is for those geeks who want to do something esoteric '''CloudPlatformStyles ''', or use those few '''CloudPlatformStyles ''' not (yet) accessible in the [[ACP Style Library]].  
+
Using [[ACP Style Library]] you don't need to understand the details below. This page is for those geeks who want to do something esoteric '''AcpStyles ''', or use those few '''AcpStyles ''' not (yet) accessible in the [[ACP Style Library]].  
  
You set general styles and options that apply to the whole model by adding flags to the '''CloudPlatformStyles ''' attribute for the main model. You set styles specific to a particular module or node by adding flags to the '''CloudPlatformStyles ''' attribute for that object.  
+
You set general styles and options that apply to the whole model by adding flags to the '''AcpStyles ''' attribute for the main model. You set styles specific to a particular module or node by adding flags to the '''AcpStyles ''' attribute for that object.  
 
   
 
   
The easiest way to view and edit the CloudPlatformStyles attribute in Desktop Analytica is to use the [[Attribute panel]].  Select '''CloudPlatformStyles ''' from the list of Attributes at the top of that panel. By default, '''CloudPlatformStyles ''' is not shown in the [[Object window]], so you first need to set it to be shown in the [[Manage attributes|Attributes dialog]].   
+
The easiest way to view and edit the AcpStyles  attribute in Desktop Analytica is to use the [[Attribute panel]].  Select '''AcpStyles ''' from the list of Attributes at the top of that panel. By default, '''AcpStyles ''' is not shown in the [[Object window]], so you first need to set it to be shown either with the [[Object_Window|right click menu]] in the Object window, or in the [[Manage attributes|Attributes dialog]].   
  
The '''CloudPlatformStyles ''' and their flags are not case sensitive.   
+
The '''AcpStyles ''' and their flags are not case sensitive.   
  
When you put multiple flags in a '''CloudPlatformStyles ''' attribute, you can separate them by commas, spaces, or newlines. We recommend putting each flag on a separate line for clarity. ACP just looks for the particular text values and doesn't care about the separators.
+
When you put multiple flags in a '''AcpStyles ''' attribute, you can separate them by commas, spaces, or newlines. We recommend putting each flag on a separate line for clarity. ACP just looks for the particular text values and doesn't care about the separators.
  
 
===ACP styles inheritance===
 
===ACP styles inheritance===
Line 28: Line 28:
 
=== Model level styles  ===
 
=== Model level styles  ===
  
These styles apply to the entire model. You set them in the '''CloudPlatformStyles ''' attribute for the Main Model. (They have no effect when set for a submodule.)
+
These styles apply to the entire model. You set them in the '''AcpStyles ''' attribute for the Main Model. (They have no effect when set for a submodule.)
  
 
==== Navigation style  ====
 
==== Navigation style  ====
  
 
These Navigation_style options control how a user can view and access the module hierarchy:
 
These Navigation_style options control how a user can view and access the module hierarchy:
* '''<code>Navigation_style: Outline</code>''' -- Show an expandable tree of modules on the left of the ACP window, similar to the outline view in desktop Analytica (showing only modules not other objects). This is the default style when you upload a model with no ACP styles set or no Acp styles library embedded, or if you have not yet set the Navigation style in the Acp styles library. A navigation flag is not needed for this style, but if you want to explicitly set this style you can add '''<code>Navigation_style: Outline</code>''' to the top diagram's '''CloudPlatformStyles ''' attribute.
+
* '''<code>Navigation_style: Outline</code>''' -- Show an expandable tree of modules on the left of the ACP window, similar to the outline view in desktop Analytica (showing only modules not other objects). This is the default style when you upload a model with no ACP styles set or no Acp styles library embedded, or if you have not yet set the Navigation style in the Acp styles library. A navigation flag is not needed for this style, but if you want to explicitly set this style you can add '''<code>Navigation_style: Outline</code>''' to the top diagram's '''AcpStyles ''' attribute.
  
 
*'''<code>Navigation_style: Top diagram only</code>''' -- Show only the top diagram, with no Outline and no tabs. This lets you make a simple web application with a single UI page.   
 
*'''<code>Navigation_style: Top diagram only</code>''' -- Show only the top diagram, with no Outline and no tabs. This lets you make a simple web application with a single UI page.   
Line 51: Line 51:
 
By default, when using the Outline Navigation style, ACP shows an expandable outline tree of modules on the left hand side of the window, similar to the Outline view in Analytica on the desktop. This makes it easy to navigate a model with an extensive hierarchy of modules.  
 
By default, when using the Outline Navigation style, ACP shows an expandable outline tree of modules on the left hand side of the window, similar to the Outline view in Analytica on the desktop. This makes it easy to navigate a model with an extensive hierarchy of modules.  
  
*'''<code>Show_outline: yes</code>''' -- The default, and unecessary for Outline Navigation style. It is generally redundant with other Navigation styles since the tabs or hierarchy show the same information, and the Outline takes up screen space. But you can add  it to the top diagram's CloudPlatformStyles attribute if you want to show the Outline tree with other Navigation styles.
+
*'''<code>Show_outline: yes</code>''' -- The default, and unecessary for Outline Navigation style. It is generally redundant with other Navigation styles since the tabs or hierarchy show the same information, and the Outline takes up screen space. But you can add  it to the top diagram's AcpStyles attribute if you want to show the Outline tree with other Navigation styles.
  
 
{{CalloutAnnotationBlock|[[File:Outline tree 6.0 01.png]]|{{CalloutAnnotation|Market model with<br>Outline Tree|v=80|pt=10,106}}}}
 
{{CalloutAnnotationBlock|[[File:Outline tree 6.0 01.png]]|{{CalloutAnnotation|Market model with<br>Outline Tree|v=80|pt=10,106}}}}
*'''<code>show_outline: no</code>''' --  When using the Acp Style library this is set by default for Navigation styles other than Outline. For small models, and most web apps, you may want to suppress the Outline view even when using the Outline Navigation style. Do this by inserting this text into the top diagram's CloudPlatformStyles attribute (See image below). (If a model has only one diagram,  i.e. with no modules, it never shows the outline tree.)<br/>
+
*'''<code>show_outline: no</code>''' --  When using the Acp Style library this is set by default for Navigation styles other than Outline. For small models, and most web apps, you may want to suppress the Outline view even when using the Outline Navigation style. Do this by inserting this text into the top diagram's AcpStyles attribute (See image below). (If a model has only one diagram,  i.e. with no modules, it never shows the outline tree.)<br/>
 
{{CalloutAnnotationBlock|[[File:Outline tree 6.0 02.png]]|{{CalloutAnnotation|Market model with <br/>'''<code>show_outline: no</code>'''|v=80}}}}
 
{{CalloutAnnotationBlock|[[File:Outline tree 6.0 02.png]]|{{CalloutAnnotation|Market model with <br/>'''<code>show_outline: no</code>'''|v=80}}}}
  
 
====Top Diagram Only====
 
====Top Diagram Only====
  
Set by adding '''<code>navigation_style: top_diagram_only</code>''' to the Cloudplayerstyle attribute of the top diagram. <!--Not to be confused with the Cloudplayerstyle flag of similar name: '''<code>top_diagram_only: yes</code>'''. -This is a navigation style most easily set with the ACP styles library. --> The Styles library will set the flag <!--'''<code>top_diagram_only:yes</code>''',--> '''<code>show_outline:no</code>''' .
+
Set by adding '''<code>navigation_style: top_diagram_only</code>''' to the AcpStyles attribute of the top diagram. <!--Not to be confused with the AcpStyles flag of similar name: '''<code>top_diagram_only: yes</code>'''. -This is a navigation style most easily set with the ACP styles library. --> The Styles library will set the flag <!--'''<code>top_diagram_only:yes</code>''',--> '''<code>show_outline:no</code>''' .
  
 
====Tabbed Module Navigation====
 
====Tabbed Module Navigation====
Line 105: Line 105:
 
Using tabbed navigation, ACP shows the model hierarchy in a bar at the top of the diagram by default. The model hierarchy header shows you where you are in a large model by listing the titles of the ancestor modules in which the current diagram is nested.  You can click any ancestor to click up levels in the hierarchy. The Hierarchy Bar takes up much less screen real estate than the Outline Tree. ACP doesn't show the hierarchy bar when you are viewing a top level module, or if the module title is already in the selected tab. <!--With a two-level tab navigation, it shows the hierarchy bar only when viewing a module nested 3 or more levels down. Basically, the hierarchy header does not duplicate what you can see in the tabs.-->
 
Using tabbed navigation, ACP shows the model hierarchy in a bar at the top of the diagram by default. The model hierarchy header shows you where you are in a large model by listing the titles of the ancestor modules in which the current diagram is nested.  You can click any ancestor to click up levels in the hierarchy. The Hierarchy Bar takes up much less screen real estate than the Outline Tree. ACP doesn't show the hierarchy bar when you are viewing a top level module, or if the module title is already in the selected tab. <!--With a two-level tab navigation, it shows the hierarchy bar only when viewing a module nested 3 or more levels down. Basically, the hierarchy header does not duplicate what you can see in the tabs.-->
  
Note that this setting is not based on a CloudPlayerstyle attribute, but rather on the ''Show module hierarchy'' check box in the model [[Preferences]] in Analytica.  If you want to set this preference manually, with the model opened in Analytica, on the [[Edit menu]], select '''Preference...''', and check (or uncheck) the ''Show module hierarchy'' checkbox.  
+
Note that this setting is not based on a AcpStyles attribute, but rather on the ''Show module hierarchy'' check box in the model [[Preferences]] in Analytica.  If you want to set this preference manually, with the model opened in Analytica, on the [[Edit menu]], select '''Preference...''', and check (or uncheck) the ''Show module hierarchy'' checkbox.  
  
 
If you are using the ACP styles library, the Styles library will set this to the default setting automatically once you select a Navigation style. But you have the option of changing it if, for instance you want to show the Outline and the Hierarchy bar.
 
If you are using the ACP styles library, the Styles library will set this to the default setting automatically once you select a Navigation style. But you have the option of changing it if, for instance you want to show the Outline and the Hierarchy bar.
Line 134: Line 134:
 
====Scroll Bars====
 
====Scroll Bars====
  
*'''<code>Add_scroll_bars: yes</code>''' You can add this flag to the top level diagram's CloudPlatformStyles attribute if you want to add scroll bars on a large diagram. Scroll bars no longer show by default when you use a custom size for your diagram since they take up diagram space. (They will show when you use the default entire browser window).
+
*'''<code>Add_scroll_bars: yes</code>''' You can add this flag to the top level diagram's AcpStyles attribute if you want to add scroll bars on a large diagram. Scroll bars no longer show by default when you use a custom size for your diagram since they take up diagram space. (They will show when you use the default entire browser window).
  
 
====Exclude diagram(s) from tabs====
 
====Exclude diagram(s) from tabs====
Line 140: Line 140:
 
When using tabbed navigation, you can select those modules (from the top model diagram) that you want to appear as a tab in ACP. The default is for all to appear as tabs. You should use the ''Show modules as tabs'' choice menu in the '''<code>ACP Navigation styles</code>''' section of the [[ACP Style Library]] if you want to set this flag,, and if you also want to hide the modules corresponding to these tabs [[ChangeNodeVisibility|hidden]], so that the model viewer cannot see them.
 
When using tabbed navigation, you can select those modules (from the top model diagram) that you want to appear as a tab in ACP. The default is for all to appear as tabs. You should use the ''Show modules as tabs'' choice menu in the '''<code>ACP Navigation styles</code>''' section of the [[ACP Style Library]] if you want to set this flag,, and if you also want to hide the modules corresponding to these tabs [[ChangeNodeVisibility|hidden]], so that the model viewer cannot see them.
  
*Optionally, Enter the text '''<code>Show_as_tab: no</code>''' in the CloudPlatformStyles attribute of the modules you don't wish to show as a tab. The modules themselves will not be hidden with this setting, only the tabs.
+
*Optionally, Enter the text '''<code>Show_as_tab: no</code>''' in the AcpStyles attribute of the modules you don't wish to show as a tab. The modules themselves will not be hidden with this setting, only the tabs.
 
<!--
 
<!--
 
*'''<code>show_as_tab: no</code>'''  
 
*'''<code>show_as_tab: no</code>'''  
Line 146: Line 146:
 
*When setting tabbed Navigation styles using the ACP Styles Library, the default is for the Top level diagram to be included, except with two tiers of tabs, for which it is (Currently) required to exclude the top diagram from the tabs.
 
*When setting tabbed Navigation styles using the ACP Styles Library, the default is for the Top level diagram to be included, except with two tiers of tabs, for which it is (Currently) required to exclude the top diagram from the tabs.
  
If you want to see what it looks like, play this model [[Media:Show as tab no.ana|Array examples]] in ACP, with the '''<code>show_as_tab: no</code>''' style in the cloud platform styles attribute, and set to tabs along top.
+
If you want to see what it looks like, play this model [[Media:Show as tab no.ana|Array examples]] in ACP, with the '''<code>show_as_tab: no</code>''' style in the AcpStyles  attribute, and set to tabs along top.
  
 
:[[File:Show as tab no02.png]]
 
:[[File:Show as tab no02.png]]
Line 156: Line 156:
 
====Tab color====
 
====Tab color====
  
When using Tabbed Navigation, you can use these flags to control how the color of the tabs display on your model in ACP. To use, add one of them to the CloudPlayerStyle attribute of the top level diagram of your model. They have no effect if added to a module other than the top diagram.
+
When using Tabbed Navigation, you can use these flags to control how the color of the tabs display on your model in ACP. To use, add one of them to the AcpStyles attribute of the top level diagram of your model. They have no effect if added to a module other than the top diagram.
  
 
*'''<code>Tab_color: Default </code>''' The default. Non-selected tabs are bluish white. The selected tab uses the background color for that diagram.
 
*'''<code>Tab_color: Default </code>''' The default. Non-selected tabs are bluish white. The selected tab uses the background color for that diagram.
Line 175: Line 175:
 
==== Enhanced Diagram Graphics  ====
 
==== Enhanced Diagram Graphics  ====
  
You can control the appearance of nodes, with bevels, shadows, by setting these in the CloudPlatformStyles for the model. By default (for now) ACP displays nodes without the bevels and shadows:<br>  
+
You can control the appearance of nodes, with bevels, shadows, by setting these in the AcpStyles for the model. By default (for now) ACP displays nodes without the bevels and shadows:<br>  
  
 
:[[Image:Nodes no shadow or bevel.png]]  
 
:[[Image:Nodes no shadow or bevel.png]]  
Line 187: Line 187:
 
:[[Image:Nodes beveled border.png]]  
 
:[[Image:Nodes beveled border.png]]  
  
<br> These effects are off by default. You are welcome to try them out, by setting CloudPlatformStyles for the main model. Eventually, these effects may become the default. Then you'll be able to turn each one off using <code>Node_drop_shadow: no, Bevel_node_border: no</code>, and<code>Glow_hover_highlight: no</code>.-->
+
<br> These effects are off by default. You are welcome to try them out, by setting AcpStyles for the main model. Eventually, these effects may become the default. Then you'll be able to turn each one off using <code>Node_drop_shadow: no, Bevel_node_border: no</code>, and<code>Glow_hover_highlight: no</code>.-->
  
 
==== Balloon Help  ====
 
==== Balloon Help  ====
Line 202: Line 202:
 
::When you mouse over a node, there's a short delay of about half a second before it displays the balloon (to prevent wild balloon appearance when you move the cursor rapidly over a diagram.) You can tweak this delay time measured in milliseconds by inserting this flag. E.g. '''<code>hover_balloon_delay: 200</code>''' to reduce the delay to .2 seconds.
 
::When you mouse over a node, there's a short delay of about half a second before it displays the balloon (to prevent wild balloon appearance when you move the cursor rapidly over a diagram.) You can tweak this delay time measured in milliseconds by inserting this flag. E.g. '''<code>hover_balloon_delay: 200</code>''' to reduce the delay to .2 seconds.
  
The three flags above go in the CloudPlatformStyles of the model and apply to all nodes in the model. You can also modify some aspects of the balloon separately for each node by inserting these flags in CloudPlatformStyles for each node:  
+
The three flags above go in the AcpStyles of the model and apply to all nodes in the model. You can also modify some aspects of the balloon separately for each node by inserting these flags in AcpStyles for each node:  
  
 
*'''<code>show_hover_balloon: no</code>'''
 
*'''<code>show_hover_balloon: no</code>'''
::Insert this flag in the CloudPlatformStyles for a node, to suppress display of its balloon.
+
::Insert this flag in the AcpStyles for a node, to suppress display of its balloon.
  
 
*'''<code>show_hover_balloon_title: no</code>'''
 
*'''<code>show_hover_balloon_title: no</code>'''
::Insert this flag in the CloudPlatformStyles  for a node, to suppress its title in the balloon.
+
::Insert this flag in the AcpStyles for a node, to suppress its title in the balloon.
 
-->
 
-->
 
<!--Not implemented yet in ACP3
 
<!--Not implemented yet in ACP3
Line 240: Line 240:
 
====Show or hide the Graph-Table icon====
 
====Show or hide the Graph-Table icon====
  
*'''<code>Show_graph_table_icon:no</code>''' Hides the icon in the top right of a Result that lets you toggle between Graph and Table view. This applies to [[Embed_table_or_graph_with_ACP|Frame nodes and tall nodes]]. This style can be used for  the entire model, for frame nodes or for individual nodes . You set them in the '''CloudPlatformStyles ''' attribute.  Conversely, you can set  *'''<code>Show_graph_table_icon:yes</code>'''. This is the default so not usually necessary at the model level, but can be used in a frame node or variable to override the model default or override a frame node setting. This icon is irrelevant and does not display in tab result views.
+
*'''<code>Show_graph_table_icon:no</code>''' Hides the icon in the top right of a Result that lets you toggle between Graph and Table view. This applies to [[Embed_table_or_graph_with_ACP|Frame nodes and tall nodes]]. This style can be used for  the entire model, for frame nodes or for individual nodes . You set them in the '''AcpStyles ''' attribute.  Conversely, you can set  *'''<code>Show_graph_table_icon:yes</code>'''. This is the default so not usually necessary at the model level, but can be used in a frame node or variable to override the model default or override a frame node setting. This icon is irrelevant and does not display in tab result views.
  
 
====Show or hide the Uncertainty view menu====  
 
====Show or hide the Uncertainty view menu====  
Line 266: Line 266:
 
-[DP]These next 2 do not work in ACPsuan so I assume we will not implement them and will replace with proactively evaluate. But will just comment them out for now.
 
-[DP]These next 2 do not work in ACPsuan so I assume we will not implement them and will replace with proactively evaluate. But will just comment them out for now.
 
*'''<code>calc_on_open: yes</code>'''  
 
*'''<code>calc_on_open: yes</code>'''  
::By default, ACP, like Analytica, does not compute results when you first view a diagram, leaving any User output nodes showing the '''Calc''' button. The user must click on each to see its result, as a scalar embedded in the Diagram, or as a separate Result window. Unless some results take a long time to evaluate, it is usually friendlier to compute the values before showing the Diagram. You can make this happen by inserting <code>calc_on_open: yes</code> into the top level diagram's CloudPlatformStyles attribute. This flag doesn't have any effect currently when applied to individual nodes.
+
::By default, ACP, like Analytica, does not compute results when you first view a diagram, leaving any User output nodes showing the '''Calc''' button. The user must click on each to see its result, as a scalar embedded in the Diagram, or as a separate Result window. Unless some results take a long time to evaluate, it is usually friendlier to compute the values before showing the Diagram. You can make this happen by inserting <code>calc_on_open: yes</code> into the top level diagram's AcpStyles attribute. This flag doesn't have any effect currently when applied to individual nodes.
  
 
*'''<code>auto_recalc_results: yes</code>'''  
 
*'''<code>auto_recalc_results: yes</code>'''  
Line 291: Line 291:
  
 
*'''<code>message_box_location: x, y</code>'''
 
*'''<code>message_box_location: x, y</code>'''
::By default, ACP shows error and other message boxes right in middle of the screen, but you can change where these display using this flag. Set this flag - with the x, y coordinates in pixels on the ACP canvas - where you want the message boxes to display. Needs to be put into the CloudPlatformStyles attribute for the top diagram of your model.
+
::By default, ACP shows error and other message boxes right in middle of the screen, but you can change where these display using this flag. Set this flag - with the x, y coordinates in pixels on the ACP canvas - where you want the message boxes to display. Needs to be put into the AcpStyles attribute for the top diagram of your model.
 
-->
 
-->
  
 
== Node Level Settings  ==
 
== Node Level Settings  ==
  
These style flags and options apply to individual nodes (variables), rather than the model as a whole. So, you set these flags on the CloudPlatformStyles for selected objects (nodes).
+
These style flags and options apply to individual nodes (variables), rather than the model as a whole. So, you set these flags on the AcpStyles for selected objects (nodes).
  
 
<!--=== Input nodes  ===
 
<!--=== Input nodes  ===
 
<!--
 
<!--
 
*'''<code>textalways</code>'''  
 
*'''<code>textalways</code>'''  
::Usually in ACP and Desktop Analytica, to enter a text value into a user input node you have to enclose it in quotes. Insert this flag into the CloudPlatformStyles for each Input node if you want it treat the input as text without requiring the user to use quotes.  Note this flag is inserted into the Formnode's CloudPlatformStyles attribute and cannot be done in the Object window or attribute panel.  Instead figure out what the identifier of the formnode is and then set the CloudPlatformStyles in the typescript window.
+
::Usually in ACP and Desktop Analytica, to enter a text value into a user input node you have to enclose it in quotes. Insert this flag into the AcpStyles for each Input node if you want it treat the input as text without requiring the user to use quotes.  Note this flag is inserted into the Formnode's AcpStyles attribute and cannot be done in the Object window or attribute panel.  Instead figure out what the identifier of the formnode is and then set the AcpStyles in the typescript window.
 
-->
 
-->
 
<!--Not implemented in flex so I will comment out for now
 
<!--Not implemented in flex so I will comment out for now
 
*'''<code>tabindex: ''n''</code>'''  
 
*'''<code>tabindex: ''n''</code>'''  
::In ACP and Desktop Analytica, the user can press tab to go to the next input control to enter its input. You can control the tab order -- the sequence followed by tabbing through inputs -- by adding this flag. Put <code>tabindex: 1</code> into the CloudPlatformStyles of the first one. Put  <code>tabindex: 2</code> into the second, and so on.  Note this flag is inserted into the Formnode's CloudPlatformStyles attribute and cannot be done in the Object window or attribute panel.  Instead figure out what the identifier of the formnode is and then set the CloupPlayerStyles in the typescript window.
+
::In ACP and Desktop Analytica, the user can press tab to go to the next input control to enter its input. You can control the tab order -- the sequence followed by tabbing through inputs -- by adding this flag. Put <code>tabindex: 1</code> into the AcpStyles of the first one. Put  <code>tabindex: 2</code> into the second, and so on.  Note this flag is inserted into the Formnode's AcpStyles attribute and cannot be done in the Object window or attribute panel.  Instead figure out what the identifier of the formnode is and then set the CloupPlayerStyles in the typescript window.
 
-->
 
-->
  
Line 312: Line 312:
  
 
*'''<code>Show_Object: no</code>'''  
 
*'''<code>Show_Object: no</code>'''  
You can prevent nodes or modules from showing on the diagram of your model, by adding this flag to the CloudPlatformStyles attribute of the object you wish to hide. Once the model is shown in ACP the objects aren't visible.
+
You can prevent nodes or modules from showing on the diagram of your model, by adding this flag to the AcpStyles attribute of the object you wish to hide. Once the model is shown in ACP the objects aren't visible.
  
 
<!--[DP] none of these work in ACP3 and I don't know if any of them will be implemented
 
<!--[DP] none of these work in ACP3 and I don't know if any of them will be implemented
Line 319: Line 319:
 
===Download_Spreadsheet:xyz.xlsx===
 
===Download_Spreadsheet:xyz.xlsx===
 
*This Cloud Player style allows you to download a spreadsheet while playing a model. You could of course have modified this Spreadsheet while working with the model.
 
*This Cloud Player style allows you to download a spreadsheet while playing a model. You could of course have modified this Spreadsheet while working with the model.
*This flag can be added to the CloudPlayerStyle attribute of a button. E.g. if you want to download <code>xyz.xlsx</code> you add <code>download_spreadsheet xyz.xlsx</code> to the CloudPlayerStyle attribute of the button. Then when pressed the button will prompt you to save the file.  
+
*This flag can be added to the AcpStyles attribute of a button. E.g. if you want to download <code>xyz.xlsx</code> you add <code>download_spreadsheet xyz.xlsx</code> to the AcpStyles attribute of the button. Then when pressed the button will prompt you to save the file.  
 
*You can't download a spreadsheet in the same button click that causes a spreadsheet to be uploaded.
 
*You can't download a spreadsheet in the same button click that causes a spreadsheet to be uploaded.
 
*If you don't specify the name of the spreadsheet file ACP downloads the last file uploaded without a dialog.
 
*If you don't specify the name of the spreadsheet file ACP downloads the last file uploaded without a dialog.
Line 328: Line 328:
 
===Upload_Spreadsheet===
 
===Upload_Spreadsheet===
  
*This flag can also be added to the CloudplayerStyle attribute of a button. It results in the user being prompted with a file upload after the button onclick completes.
+
*This flag can also be added to the AcpStyles attribute of a button. It results in the user being prompted with a file upload after the button onclick completes.
  
 
*As with the <code>Download_Spreadsheet</code>, flag, you can do this "on the fly" in your model by having an [[OnClick]] attribute that sets this flag in the CPS attribute.
 
*As with the <code>Download_Spreadsheet</code>, flag, you can do this "on the fly" in your model by having an [[OnClick]] attribute that sets this flag in the CPS attribute.
Line 341: Line 341:
  
 
===Save_on_click:yes===
 
===Save_on_click:yes===
This flag can be added to the cloudplayerstyle attribute of a  button. Then it works as a "save as" button. Ie the save dialog opens when the button is pressed.
+
This flag can be added to the AcpStyles attribute of a  button. Then it works as a "save as" button. Ie the save dialog opens when the button is pressed.
  
 
==="ACP_save_as_filename" variable===
 
==="ACP_save_as_filename" variable===
Line 352: Line 352:
 
<!--[DP]Removed as of 42
 
<!--[DP]Removed as of 42
 
==="Save_as_Public:Yes===
 
==="Save_as_Public:Yes===
Another flag which can be used with a button, only in combination with the cloudplayerstyle <code>save_on_click:yes</code>. This flag causes the access of a model snapshot saved in a group account to be public by default.
+
Another flag which can be used with a button, only in combination with the AcpStyles <code>save_on_click:yes</code>. This flag causes the access of a model snapshot saved in a group account to be public by default.
  
 
===Asychronous calls===
 
===Asychronous calls===

Revision as of 09:56, 15 October 2021

<<Back to Analytica Cloud Player


Release:

4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0


ACP offers a wide variety of styles and options to control the look and functioning of the user interface. Many of these go beyond what is (currently) available in Desktop Analytica (DTA).

The easiest way to set most of these styles and options is to use the ACP Style Library. Select Add Library... from the File menu and select the ACP Style Library to add into your model. This library lets you interactively select most ACP styles and options for Navigation, Frames and nodes using menus and checkboxes and menus. If you make choose configurations while running the model in ACP, you can see their effects immediately in your model.

Using ACP Style Library you don't need to understand the details below. This page is for those geeks who want to do something esoteric AcpStyles , or use those few AcpStyles not (yet) accessible in the ACP Style Library.

You set general styles and options that apply to the whole model by adding flags to the AcpStyles attribute for the main model. You set styles specific to a particular module or node by adding flags to the AcpStyles attribute for that object.

The easiest way to view and edit the AcpStyles attribute in Desktop Analytica is to use the Attribute panel. Select AcpStyles from the list of Attributes at the top of that panel. By default, AcpStyles is not shown in the Object window, so you first need to set it to be shown either with the right click menu in the Object window, or in the Attributes dialog.

The AcpStyles and their flags are not case sensitive.

When you put multiple flags in a AcpStyles attribute, you can separate them by commas, spaces, or newlines. We recommend putting each flag on a separate line for clarity. ACP just looks for the particular text values and doesn't care about the separators.

ACP styles inheritance

This is the order of inheritance of Acpstyles. Styles at a higher level take precedence over the lower precedence styles. Note that this is only applicable for styles that are usable for different levels eg. styles useful for both variables and Frame nodes..

  1. Variable (includes Tall nodes): Acpstyles applied to an individual variable will take precedence over all other styles. A variable with a style of show_title:no will not show the title, even if the model level style is show_title:yes, and if that node shows it's result in a frame node the variable style will override the frame node style.
  2. Frame : An Acpstyle set for a frame node will affect any variable shown in that frame that doesn't have its own settings. These will also override any styles at the model level.
  3. Model ACP style defaults: Acpstyles that you can enter into the Acptyles attribute of the top diagram of your model. These will override the ACP3 defaults, and will be inherited by frame nodes and variables in the model that don't have their own Acpstyle.
  4. ACP style defaults for ACP3: The default style ACP3 uses if you have no specific setting for that style. Eg for show_index_menus the default is fly-in and that is what will show if you don't enter a different show_index_menus: Acpstyle flag in the Acpstyle for the top diagram (model level) or for frame nodes or variables.

Model level styles

These styles apply to the entire model. You set them in the AcpStyles attribute for the Main Model. (They have no effect when set for a submodule.)

Navigation style

These Navigation_style options control how a user can view and access the module hierarchy:

  • Navigation_style: Outline -- Show an expandable tree of modules on the left of the ACP window, similar to the outline view in desktop Analytica (showing only modules not other objects). This is the default style when you upload a model with no ACP styles set or no Acp styles library embedded, or if you have not yet set the Navigation style in the Acp styles library. A navigation flag is not needed for this style, but if you want to explicitly set this style you can add Navigation_style: Outline to the top diagram's AcpStyles attribute.
  • Navigation_style: Top diagram only -- Show only the top diagram, with no Outline and no tabs. This lets you make a simple web application with a single UI page.


For the next two 'Tabbed application' styles, each module in the main model becomes a tab. The order of the tabs follows the sequence of the module nodes in the main diagram, from left to right then top to bottom.

  • Navigation_style: Top_tabs -- The main modules in the top model appear as a row of tabs across the top of the window. Click a tab to show the diagram for that module.
  • Navigation_style: Side_tabs -- The main modules in the top model appear as a column of tabs on the left of the window. Click a tab to show the diagram for that module.

We describe each in more detail below.

Outline Tree

By default, when using the Outline Navigation style, ACP shows an expandable outline tree of modules on the left hand side of the window, similar to the Outline view in Analytica on the desktop. This makes it easy to navigate a model with an extensive hierarchy of modules.

  • Show_outline: yes -- The default, and unecessary for Outline Navigation style. It is generally redundant with other Navigation styles since the tabs or hierarchy show the same information, and the Outline takes up screen space. But you can add it to the top diagram's AcpStyles attribute if you want to show the Outline tree with other Navigation styles.


Outline tree 6.0 01.png


Market model with
Outline Tree
  • show_outline: no -- When using the Acp Style library this is set by default for Navigation styles other than Outline. For small models, and most web apps, you may want to suppress the Outline view even when using the Outline Navigation style. Do this by inserting this text into the top diagram's AcpStyles attribute (See image below). (If a model has only one diagram, i.e. with no modules, it never shows the outline tree.)


Outline tree 6.0 02.png


Market model with
show_outline: no

Top Diagram Only

Set by adding navigation_style: top_diagram_only to the AcpStyles attribute of the top diagram. The Styles library will set the flag show_outline:no .

Tabbed Module Navigation

As an alternative to the Outline view, you can set the Navigation_style to use use a tabbed interface which is often more convenient and familiar for web applications. By default, the main model appears as the first tab. You can change this with the style show_as_tab:no described below.

There are two tabbed styles, Top_tabs, with a row of tabs across the top; and Side_tabs with a column of tabs down the side. Top_tabs works well if you have up to 5 to 8 modules in the main diagram (tabs), depending on the length of their titles and the width of the ACP window. If you have a lot of modules, or they have long titles, it may be better to use Side_tabs.

'Top tabs or side tabs.' The first tab displays the top level diagram, and the remaining tabs display the modules present on the top level diagram of the model. (The modules will not display on the diagram, so you need to tweak your diagram for playing in ACP so that it looks right without these present).

  • navigation_style: top_tabs -- This setting instructs ACP to use the 'Tabs across top' navigation style.

Top tabs 6.0 01.png

  • navigation_style: side_tabs -- This setting instructs ACP to use the 'Side tabs' navigation style. Side tabs work better than top tabs when there are more module nodes present.

Side tabs 6.0 01.png

Toolbar Tabs

  • show_tabs: no -- By default, with the Outline Navigation style. ACP shows navigation tabs for "Diagram", "Object", "Table", "Graph" along the top. Use this flag to hide those tabs. If you display the model inputs and outputs on the diagram -- using embedded tables and graphs on the diagram -- your users may not need those tabs. (You can also use show_tabs: yes to explicitly show the tabs in Outline and Top diagram only Navigation styles.)


Show tabs no 6.0 0.1.png


Market model with
show_tabs: no


Module hierarchy bar

Using tabbed navigation, ACP shows the model hierarchy in a bar at the top of the diagram by default. The model hierarchy header shows you where you are in a large model by listing the titles of the ancestor modules in which the current diagram is nested. You can click any ancestor to click up levels in the hierarchy. The Hierarchy Bar takes up much less screen real estate than the Outline Tree. ACP doesn't show the hierarchy bar when you are viewing a top level module, or if the module title is already in the selected tab.

Note that this setting is not based on a AcpStyles attribute, but rather on the Show module hierarchy check box in the model Preferences in Analytica. If you want to set this preference manually, with the model opened in Analytica, on the Edit menu, select Preference..., and check (or uncheck) the Show module hierarchy checkbox.

If you are using the ACP styles library, the Styles library will set this to the default setting automatically once you select a Navigation style. But you have the option of changing it if, for instance you want to show the Outline and the Hierarchy bar.

Use top diagram size for all ACP windows

  • Use_top_diagram_size:Yes -- Sets the size of all diagrams based on the size of the diagram window of the top level when the model was last viewed in Desktop Analytica (in non-maximized mode). Use_top_diagram_size:No is the same as if the flag is not set, and is the default - the ACP diagram will use the entire browser window.

Show or hide the Dashboard Title and Model title

  • show_model_title: no -- Hide the title of the model, which appears by default in the top Teal bar.
  • show_diagram_title: yes -- Use to show the dashboard title at the top of the diagram. Or show_diagram_title: no to suppress the diagram title, but not really necessary because ACP does not show the diagram title by default.

Scroll Bars

  • Add_scroll_bars: yes You can add this flag to the top level diagram's AcpStyles attribute if you want to add scroll bars on a large diagram. Scroll bars no longer show by default when you use a custom size for your diagram since they take up diagram space. (They will show when you use the default entire browser window).

Exclude diagram(s) from tabs

When using tabbed navigation, you can select those modules (from the top model diagram) that you want to appear as a tab in ACP. The default is for all to appear as tabs. You should use the Show modules as tabs choice menu in the ACP Navigation styles section of the ACP Style Library if you want to set this flag,, and if you also want to hide the modules corresponding to these tabs hidden, so that the model viewer cannot see them.

  • Optionally, Enter the text Show_as_tab: no in the AcpStyles attribute of the modules you don't wish to show as a tab. The modules themselves will not be hidden with this setting, only the tabs.

Tab color

When using Tabbed Navigation, you can use these flags to control how the color of the tabs display on your model in ACP. To use, add one of them to the AcpStyles attribute of the top level diagram of your model. They have no effect if added to a module other than the top diagram.

  • Tab_color: Default The default. Non-selected tabs are bluish white. The selected tab uses the background color for that diagram.
  • Tab_color: Background All tabs use their diagram background color, whether selected or not
  • Tab_color: Node The selected Tab uses its diagram background color; The other tabs use the color of their Module node (not their diagram background color). You can use this to change the color of the tabs by modifying their node color in an Analytica functions.

Model level styles for diagram nodes.

You can set some styles for your model - at the top model diagram level - which will effect how nodes on the diagram are displayed. All nodes in the model will be effected.

  • show_hover_highlight: yes Usually unnecessary because this is the default. ACP displays a hover highlight -- a contrasting light rectangle behind a node -- when you move the cursor over the node. (The hover highlight is different from the Help Balloon described below.)

Acp hover hl.png

  • glow_hover_highlight: yes Set this flag to show a "glowing" highlight around each node, instead of the outline when you move the cursor over a node.
  • glow_hover_highlight: no Switches off this behavior, and is usually unnecessary since it is the default behavior in ACP.
  • show_hover_highlight: no You can suppress the hover highlight completely (no outline or glow) by including this style in the top level model object. It does have any effect currently when applied to individual nodes.

Enhanced Diagram Graphics

You can control the appearance of nodes, with bevels, shadows, by setting these in the AcpStyles for the model. By default (for now) ACP displays nodes without the bevels and shadows:

Nodes no shadow or bevel.png
  • node_drop_shadow: yes Setting this flag, displays a drop shadow behind each node, giving a kind of 3D effect:
Nodes drop shadow.png
  • bevel_node_border: yes Setting this flag, displays a bevel border for each node, giving another kind of 3-D effect:
Nodes beveled border.png


These effects are off by default. You are welcome to try them out, by setting AcpStyles for the main model. Eventually, these effects may become the default. Then you'll be able to turn each one off using Node_drop_shadow: no, Bevel_node_border: no, andGlow_hover_highlight: no.-->

Balloon Help

When you move the cursor over a node, ACP usually shows a "balloon" popup next to the node with the title, units and description of the node (if it has one) to help end users understand what its for, or what to enter for a user input. If the node has no description, the balloon help will not appear.

  • show_id_in_balloon: yes Use this flag to show each node's identifier below its title in the balloon -- unless the identifier and title are identical (except for spaces which are replaced by underscores).

Acp styles used both at the model level and at node level

These styles can be set at the model level - which effects every node in the model. They can also be set at the node level and, except for Autocalc, for ˞Frame nodes. When set for a Frame node, these styles override the model level style and will be used for all variables that display in the frame node. Unless there is an individual node style - which overrides both Model level and Frame node styles.

Show or hide the Description

  • Show_description: nn' Where nn is a number between 0 and 100, where it uses up to nn% of the vertical space available to show the description, showing vertical scroller if that isn't enough to show the entire description. Set nn = 0, if you don't want to show the description at all (and no scroller). Default if not mentioned, is one third, i.e. Show_description: 33. This style can be used at the model level, for frame nodes or for individual nodes, but controls whether or not the Description shows in tall nodes or Frame nodes. The description is always present in tab result views.

Show or hide the title

  • Show_title: Set Show_title: yes to show or Show_title: no to stop showing the Title and units of a selected variable. This style can be used at the model level, for frame nodes or for individual nodes, but controls whether or not the Title and units show in Frame nodes or tall nodes. The title is always present in tab result views.

Show or hide the Graph-Table icon

  • Show_graph_table_icon:no Hides the icon in the top right of a Result that lets you toggle between Graph and Table view. This applies to Frame nodes and tall nodes. This style can be used for the entire model, for frame nodes or for individual nodes . You set them in the AcpStyles attribute. Conversely, you can set *Show_graph_table_icon:yes. This is the default so not usually necessary at the model level, but can be used in a frame node or variable to override the model default or override a frame node setting. This icon is irrelevant and does not display in tab result views.

Show or hide the Uncertainty view menu

By default, in ACP, as in desktop Analytica, the Uncertainty views menu appears above each result graph or table to let you select Mid to display its deterministic value, or Mean, Probability distribution, and other ways to display a probabilistic value.

You can override this default behavior with this ACP style for the entire model, Frame nodes, or for individual variables. The Uncertainty view menu is always present in tab result views.

  • Show_uncertainty_view: No Never show the uncertainty menu in frame nodes or tall result nodes. Suitable for models with no probabilistic values, or if you want to fix a particular probabilistic view for each frame node or variable so that ACP users can't change it.
  • Show_uncertainty_view: Yes Always show the uncertainty menu even for variables that are not probabilistic, as in Desktop Analytica. This is the default and not normally necessary at the model level, but can be used to customize which frame nodes or variables to show the uncertainty view menu when the model level style is set to Show_uncertainty_view: No

Show or hide the Index menus and Pivoters/slicers

  • Show_index_menus: Fly-in By default (the same as if there is no show_index_menu: setting) the index menus are not shown in [nodes or tall nodes] (but slicers are), since often the modeler has already chosen the pivot they want to use. And because these menus take up valuable screen space. But if you hover over the frame node (or tall node) there is a fly-in pivoter control. If you click this it toggles - on or off - the visibility of the pivoters; allowing you to pivot the result table or graph and then close the pivoters to give you more space.
  • Show_index_menus: Yes If you do want to allow users to be able to pivot or change the slice of the table or graph, without using the fly-in, then use use show_index_menus:yes. Always present in tab result views.
  • Show_index_menus: No If show_index_menus:no is set then the indexes and pivoters will not show and there is no fly-in, but the slicers will still be present.
  • Show_index_menus: Not_even_slicers If you don't want to show any pivoters or slicers, you can set show_index_menus:Not_even_slicers.

Autocalc

In the ACP Style Library, Autocalc looks like a style you can set for a model, module or variable. It controls whether ACP evaluates each variable and shows its results automatically when you view a Diagram or tab showing the -- instead of the default Analytica behavior where the end user has to click on a Calc button to compute a result. With Autocalc on, a result in view also recomputes automatically when you change an input that influences it.

Autocalc is not actually an ACPStyle in ACP3. (It was in ACP1.) Autocalc is implemented using the Desktop Analytica functionality for Proactive_Evaluation.


Node Level Settings

These style flags and options apply to individual nodes (variables), rather than the model as a whole. So, you set these flags on the AcpStyles for selected objects (nodes).


Other node level flags

Prevent nodes from showing on the diagram

  • Show_Object: no

You can prevent nodes or modules from showing on the diagram of your model, by adding this flag to the AcpStyles attribute of the object you wish to hide. Once the model is shown in ACP the objects aren't visible.


See Also

Comments


Dpaine

6 months ago
Score 0

Autocalc was a combination of autorecalcresults and calc_on_open. They were in the diagram style section of this page, but I just commented them out since they do not work (yet) in ACP3/suan and I don't think we have any intention of including them, since proactively evaluate can I think replace the functionality. These are still mentioned in the style library wiki page, but I intend to remove it.

I'll put a link to the proactivelyevaluate page though, and I will add it to new DTA features in ACP with a link to its wiki page.

You are not allowed to post comments.