Attributes
(Up to Analytica Reference)
Attribute Reference
An Attribute is a property or field of an Analytica Object. Some Attributes are easily visible and editible by users -- for example, Identifier, Title Description, and Definition of a Variable. Others are visible but not directly modifiable -- for example, the Inputs and Outputs of a Variable. Some only apply to a particular object type -- for example, Author applies only to a Module (including Model and Library); Parameters and Recursive apply only to a Function. There are also many internal attributes not normally seen by users -- for example, Nodeinfo, NodeSize, and Nodefont. This page gives details on all Attributes, both user-visible and internal, organized by type(not alphabetically).
Common editable attributes
These attributes are common to several classes and directly editable by end users in Edit mode in the Object window and Attribute panel:
- Class
- The class of the object. You may change Class only to other compatible classes: You can change an Object of subclass Variable (Chance, Constant, Determ, Decision, Index, Objective, Variable) to another variable Class. You may change an object of Module subclass (Library, FiledLibrary, Model, Module, FiledModule, or Form) to another of that class. You can't change the class of a Function, Button, or system object. In Edit mode, in the Object view or Attribute panel, the Class appears as a pulldown menu offering available options.
- Identifier
- The unique identifier of the object. An identifier must start with a letter, and contain only letters, digits, or underscore, up to 20 characters. Identifiers are insensitive to case -- Analytica usually displays them with the first letter uppercase and the rest lowercase.
- Title
- A word or brief phrase identifying the the object. It usually appears in the diagram node, and in many other places in the user interface. A title can be up to XX characters, although it's usually best to limit it to about 50 characters. By default, the identifier is created from the first 20 characters of the title, substituting "_" for blank or any other character that isn't a letter or digit.
- Description
- Text that documents the object. For a variable, it should describe what the quantity represents. For a function, it should describe what value it returns and what parameters it expects. If the definition is not simple, it should also explain briefly what definition is doing. It should also mention any exceptions, such as what it does if an input or parameter is outside the expected domain.
- Units
- The units of measurement of a variable, or value returned by a function. Usually best to use abbreviated units so it is not longer than about 10 characters.
- Definition
- The Analytica expression used to compute the value of a variable or function.
- Check
- A validation expression, used to verify that the computed result value is valid. This can help prevent errors from being introduced without being detected. Can also be used to validate user input. See Check Attribute.
Editable attributes of Functions
These are attributes of functions that are directly modifiable by users, in addition to those listed above as "Common".
- Parameters
- A list of the parameters, enclosed in parentheses, including parameter qualifiers. It is good practice to also list the parameters (without qualifiers) in the title, so users can immediately see what parameters it expects from the node.
- Recursive
- A boolean, with value 0 (default) or 1, specifying whether this function is recursive -- i.e., it may call itself in its definition, or call another function that calls it (mutually recursive). By default, it is not displayed. You need to set it to be displayed in the Attributes... dialog.
Editable Attributes of Modules
- Author
- The name(s) of the people who created this module. When you start a new model, it may automatically fill this in with the name of the owner of the computer, if registered with Windows.
- TemplateInput
- Identifies a single variable within the module that functions at the module's primary input. Drawing an arrow into this module node inserts the origin of the arrow as the definition of this variable. (new to 4.2)
- TemplateOutput
- Identifies a single variable within the module that serves as the module's primary output. Drawing an arrow from this module node treats this variable as the origin of the arrow -- for example, for use as an input to another object. (new to 4.2)
Non-editable attributes of modules
These are attributes of modules, visible but not editable in the Object window and Attribute panel:
- Saveauthor
- The name of the owner of the computer, if registered with Windows, on which this module was last saved from Analytica.
- Date (Created)
- The time and date on which the module was first created.
- Savedate (Last Saved)
- The time and date on which this model or separately filed module or library was last saved.
- Fileinfo (File info)
- The directory path and name of the file in which this model was read from or last saved.
Nondisplayed attributes of Module
- Contains
- A list of the objects in this module.
- Isin
- The parent module of the given object.
Displayable, non-editable attributes of variables and functions
These attributes are of variables and functions are visible, but not editable, in the Object window and Attribute panel:
- Value
- The computed value of the variable (not available for functions). May be displayed in Object window, but is not displayed by default.
- Inputs
- A list of variables and functions used in the definition, after definition has been parsed. Before parsing, it may contain variables and functions from which arrows were drawn.
- Outputs
- A list of variables and functions that use this object in their definitions.
- EvaluationTime
- The number of CPU seconds that have been spent evaluating or obtaining the value of the variable, or computing the result of the function, since the object was created or loaded, or since the ResetEvalTimes command was last executed. This timing does not include the time spent evaluating parent values.
- EvaluationTimeAll
- The number of CPU seconds spent in evaluation of the object, including time spent evaluating or obtaining the values of other variables that it depends on. This is the cumulative time since the object was first created or loaded, or since the ResetEvalTimes command was last executed.
Node attributes
These attributes contain information about the node depicting the object in a diagram.
- Nodelocation
- The location of the node center in its parent diagram, as x,y,1, where x and y are number of pixels rightwards and downwards from the top-left corner of the diagram. The "1" means what???
- Nodesize
- The size of the node, as x,y, where x and y are the half width and half height in pixels, i.e. the distance from node center to edges.
- Nodefont
- The node font family and size in points, e.g. Bodoni, 16. If empty, it uses the default font family and size set for the parent diagram module.
- Nodecolor
- The color for this node, as r,g,b, where each color is in the range 0 to ????. If empty, it uses the default color set for this object class.
- Nodeinfo
- Node style attributes (usually set in Set Node style... dialog
- 1,inputArrows,outputArrows,label,border,fill,useCustomFont,widthOfCtrl,bevel,showFormIcon,embedded,hidden
- All of these are boolean 0 or 1 except widthOfCtrl. WidthOfCtrl applies only to form nodes, where it is a number specifying width of the entry field area or button. ShowFormIcon controls whether the little result mode icon (e.g., "Mid") displays to the right of the result button. Embedded is reserved for a future release, where it will specify that the edit table, result view, or module is shown directly on the diagram within the node's rectangular area. Hidden is also for a future release, where it causes the node to not show up on the daigram even though it is a child of the module. Users who know it exists can still get to it in various ways, but just not from the diagram.
- Defaultsize
- Attribute of module specifying the default size for new nodes, using the same format as Nodesize. If empty, it inherits the default size from parent module, or for Analytica initialization.
- Att_hyperlinkPref
- new to Analytica 4.2 -- When a handle is displayed in a result table, double clicking on the cell hyperlinks to the object pointed to by the handle. This attribute controls what the hyperlink jumps to. The attribute is inherited, so if you set this attribute for your model object, it will act as the model-wide default. If you set it on a particular module, it will be the default for results inside that module. If you set it for a particular variable, then it applies only to that variable. Possible values are: 1 = Jumps to object window (behavior in 4.1). 2 = Jumps to parent diagram with object selected (default in 4.2). 3 = For handles to modules, open the module's diagram with nothing selected. For non-modules, opens the parent diagram with object selected.
Window status
- Diagstate
- The location and size of the diagram window, where x, y are location of top left corner, w and h are width and height in pixels. b is a bit field that stores the diagram style options. t is the style for tabs when a tabbed diagram style is selected.
v, x, y, w, h, b, tabs
- v is a version number, and should always be 1.
- b is a bit field, which is the sum of the following values:
- 1 = Show arrows to/from modules
- 2 = Show arrows to/from indexes
- 4 = Show arrows to/from functions
- 8 = Show dynamic dependency arrows
- 16 = Tabbed diagram. Modules in diagram display as tabs, selected module's contents displays in diagram. (Not exposed as of Analytica 4.2)
- tabs is reserved for a future enhancement (not exposed as of Analytica 4.2) It encodes whether the diagram is a tabbed diagram, which side the tabs display on, and which style of tabs are used. Possible values are:
- 0 = Tabs hidden (e.g. overlays, controlled via button scripts)
- 1 = Tabs on top (default)
- 2 = Tabs on bottom
- 3 = Tabs on left (vertical text)
- 4 = Tabs on right (vertical text)
- 5 = Wide tabs on left (horizontal text)
- 6 = Wide tabs on right (horizontal text)
- Windstate
- The location and size of the object window, where X, Y are location of top left corner, W and H are width and height in pixels. v is version number, usually 1. (Applies to all user-defined objects.)
v, X, Y, W, H
- ValueState
- The type, location and size of the result window for a variable, where X, Y are location of top left corner of the window, W and H are width and height in pixels, Graph is 1 if a graph view, 0 if a table view, and U is text defining the uncertainty view. v is version number, usually 1. (Applies only to variables.)
v, X, Y, W, H, Graph, U
- Reformval
- Lists the indexes for a multidimensional variable, in sequence defining which index is for rows (x axis), which for columns (key), and the remaining as slicers, from bottom to top.
- NumberFormat
- Saves the number format parameters specified for a variable or function.
- DisplayInputs
- A list of objects among inputs from which arrows are to be displayed. It does not display arrows from Inputs that are not in Displayinputs.
- IsIn
- The module that contains this object. (Applies to all objects except the top model.)
- Contains
- The list of objects in this module. (Applies only to modules.)
- Defaultsize
- The default node size, w is half-width, and h is half-height in pixels for nodes in this module. (Applies only to modules.)
- Att_usebyprevindex
- ???
Non-editable attributes of objects
- FixedDef
- The parse-tree (DCODE) of the definition. It displays as the code, usually with extra parens.
Internal Engine
Att_versionRange
Att_canBeIn
Att_dirties
Att_showable
Att_saveAlways
Att_recordSysFunDependencies
Att_Saveable
Att_attributeType
Att_readOnly
Att_domainKids, Att_domainParents
UI State
Att_resultSlicerState
(new to 4.0)
Att_editSlicerState
(new to 4.0)
NodeFontColor
(new to 4.0)
Controls the font color of a node in a diagram. There is no user-interface mechanism to set this, changing the font color of a node must be done through typescript. The attribute consists of three comma-separated integers, encoding Red, Green, and Blue components, with each integer being in the range of 0 to 65535. For example, the following renders the Secured_Revenues variable node using green characters:
NodeFontColor Secured_Revenues : 0,65535,0
Graphing
xyExpr
Contains one external/exogenous value expression. Recognized by Analytica 3.1 an earlier, where the expression for the X value in an XY graph was stored.
Att_exogenousValue
(new to 4.0) Holds a list of external values for a result window, which can then be used as graphing dimensions. Analytica 4.0 allows more than one external value to be brought in for plotting against the primary result of a variable. This attribute holds a list of expressions -- most commonly, each expression consists of a single variable identifier.
The xyExpr may also contain one addition external expression. (The reason it is split across two attributes is for greater 3.1 interoperability).
Att_indexRange
Att_valueRange
Att_continuousLineStyle
Att_categoricaLineStyle
Att_stackedBar
Att_stackedLine
Att_barOverlap
Graphing Role Attributes
(new to 4.0)
These attributes are: Att_xRole, Att_yRole, Att_colorRole, Att_symbolRole, Att_symbolSizeRole, Att_originRole.
These attributes, in coordination with the reformVal attribute, define the current graphing pivot. The settings in these attributes are combined with the current chart type, dimensions present in the current value (or values), etc., and Analytica may adjust the pivot actually shown to create a consistent set of roles. Since the dimensionality of results can change in Analytica (as upstream dimensions or added or removed, the view type can be changed, or the number of elements in a dimension may change), the exact pivot used the previous time the graph was displayed may no longer be sensible. However, when possible, the roles defined in these attributes do become the roles used in the graph.
Each of these role attributes can hold values in several possible forms:
- Self: The keyword Self indicates that the main result fills the role.
- barOrigin: The attribute name barOrigin indicates that the expression found in the legacy barOrigin attribute fills the role.
- xyExpr: The attribute name indicates that the expression found in the xyExpr attribute fills the role.
- identifier : The identifier indicates that the index having this identifier fills the role.
- Sys_LocalIndex("name"): Syntax indicating that the local index having the indicated name is used.
- Sys_CoordIndex(value) : The slice of the main result corresponding to [CoordIndex=value] is used, where value is an element of the coordinate index.
- 0 : The numeric value zero indicates that the main result is used (same as Self).
- n > 0: A positive integer value indicates that an external value is used. Several exogenous values may be attached to the result view (see Att_exogenousValues and xyExpr attributes). These are numbered, with the xyExpr always being n=1 if present, and then the remaining continuing in order through those listed in Att_exogenousValues, and finally the legacy barOrigin attribute expression coming last.
- n < 0: A negative integer value identifies a coordinate index slice by position. The role uses the slice of the main result corresponding to [@CoordIndex=abs(n)].
Also barOrigin.
Enable comment auto-refresher