Difference between revisions of "Manage attributes"

Line 186: Line 186:
|[[CloudPlayerStyles|Cloud Player Styles]]
| <nowiki>+</nowiki>
| <nowiki>+</nowiki>
| <nowiki>+</nowiki>
| <nowiki>+</nowiki>

Latest revision as of 16:03, 16 October 2021

Each object, such as a variable, module, or function, is a collection of Attributes. Some attributes, notably class, identifier, title, and description, apply to all objects of any Class. Others apply only to selected classes. For example, Definition, Inputs, and Outputs apply to Variables and Functions, but not Modules. See Attributes for a brief explanation of these (and other) attributes. Button and Picture classes use the settings for Variables appropriate.

You can see the Attributes of an object in the Object Window and in the Attribute panel, and edit some of them in Edit mode. This table shows which attributes you can see in these views, always, marked as , or optional, marked as +. (Blank means the attribute does not apply to that class of objects.) You can use the Attributes dialog below to select which of the optional Attributes to show:

Attribute Variable Function Module Notes
Class Classes of object include Decision, Variable, Function, Model, Module, and Attribute itself
Identifier The unique name of the object. Up to 20 characters starting with a letter
Description Explains what this object represents
Title Brief text that appears in the objects node in a Diagram
Definition A number, array, or expression from which to compute the value of this variable or function
Units For example, km/hr, KWh, or Btu
Help + + + If specified, this text appears in balloon when you move the cursor over a node, instead of the Description
Domain + The range of numbers or list of numbers or text values valid for this variable.
Inputs + + List of variables and functions used in the Definition
Outputs + + List of variables and functions that use this variable in their Definitions
Value + The computed mid (deterministic) value of a variable
Initial Guess + For nonlinear optimization, the solver uses this as the starting value for a Decision when finding its optimal value. Optimizer edition, decision nodes
MetaOnly + Set true for an Index that contains handles to variables which should not be evaluated in this index.
OnChange + For a user input, an expression to evaluate when the user changes the definition of the variable. Shown in Object window only for user inputs.
Script + For a Button, a script to evaluate when the user clicks the Button. Obsolete. Use OnClick and OnChange instead.
Parameters + The list of parameters of a user-defined Function
Recursive + Set true if the function can call itself.
Check + + Evaluate this expression to check the validity of the value whenever the Variable or Function is evaluated.
Author The name(s) of the person (people) who created this model.
Created Date this module was created.
File Info The name of the file into which this model was last saved.
Last Saved The date this model was last saved.
User-created (up to 5) + + + You can create your own attributes to do what you want.
Caching Method + Specifies whether the variable should cache its value after computing it, or reclaim the memory for other purposes.
AcpStyles + + + Flags and codes that specify styles and options used by the Analytica Cloud Player.
Cell Default + The default value(s) to use in a new cell (row, column, or slice) of an Edit table when one of its Indexes is expanded. Does not appear for non-tables
Cell Format Expression + An expression that computes the format of a table cell -- for example, making negative numbers red. Analytica 5.0 or later
Cue Text + Light gray text that appears in a user input field to prompt on what kind of input is expected. Analytica 5.0 or later
Parameter Enumerations + List(s) of possible values for function parameters that allow only selected values.
Template Input + The identifier of a variable in the module used as the default input when you draw an arrow to the module node.
Template Output + The identifier of a variable in the module used as the default output when you draw an arrow from the module node.


plain editable by user
italic set by Analytica
always displayed
+ optionally displayed

Attributes dialog

Use the Attributes dialog to control the display of optional attributes in the Object window and Attribute panel and to define new attributes. To open the Attributes dialog, select Attributes from the Object menu.

Chapter19 12.png
  • Class: Use this menu to select variables, modules, or functions, so you can see and select the Attributes for that class.
  • Attribute list: A list of the attributes optionally visible for the selected class. Attributes with an asterisk (*) are always displayed in the Object window and Attribute panel. Other Attributes with a checkmark are displayed optionally

Display optional attributes

To display an optional attribute in the Object window and Attribute panel, click the attribute once to select it, then again to show a checkmark (√) to indicate it will be shown in these two views.

To hide an optional attribute, click it once to select it, then again to remove the checkmark.

Create new attributes

You can create up to five additional attributes. For example, you could use a Source attribute to include a bibliographic reference or URL for information on which this number or expression of the Variable is based.

To create a new attribute in the Attributes dialog:

  1. Select new Attribute from the attribute list to show the new Attribute Title field and the Create button.
  2. Enter the title for the new attribute in the Title field. The title can contain a maximum of 14 characters; 10 characters are the maximum recommended for visibility with all screen fonts.
  3. Click the Create button to define the new attribute.

A newly created attribute is displayed for modules, variables, and functions. To control whether or not it is displayed for modules, variables, or functions, select the Class popup menu in the Attributes dialog, and turn the checkmark on or off.

Rename an attribute

To rename a created attribute:

  1. Select it in the Attribute list. The Title field and the Rename button appear.
  2. Edit the name of the attribute in the Title field.
  3. Click the Rename button.

See Also


You are not allowed to post comments.