Attributes
(Up to Analytica Reference)
An Attribute is a property or field of an Analytica Object, such as the Identifier, Title, and Value of a Variable. Some attributes you can easily see and change -- such as, the Class, Identifier, Title, Description, and Definition of a Variable. Others you can see, but can't modify directly -- such as, the Value, Inputs and Outputs of a Variable. Some attributes apply to a particular object class -- such as Author and Creation date apply only to a Model or Module; the Parameters and Recursive attributes apply only to a Function. There are also many internal attributes you don't usually see -- such as, Nodeinfo, NodeSize, and Nodefont. This page describes first the most common editable Attributes, then non-modifiable Attributes, and finally obscure internal Attributes that users rarely need to know about.
Common editable attributes
These attributes are common to all classes of user-defined objects. You can edit them directly in Edit mode in the Object window and Attribute panel:
- Class
- The class of the object, such as Variable, Index, Function, or Module. You may change the Class of an object only to a compatible class: You can change a Variable whose Class is Chance, Constant, Determ, Decision, Index, Objective, Variable to another of these Classes. You may change a Module from Module subclass to another, including Library, FiledLibrary, Model, Module, FiledModule, or Form. You can't change the class of a Function, Button, Text or system object. In Edit mode, in the Object window or Attribute panel, the Class appears as a pulldown menu that lets you change it to another compatible Class.
- Identifier
- The unique name or 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 -- but Analytica retains and shows the case originally provided (or adapted from the Object's title). So you can use CamelCase to clarify words in the identifier.
- 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. It's best to limit a Title to about 50 characters. By default, the identifier is created from the first 20 characters of the title, substituting "_" for blank or any character that isn't a letter or digit.
- Description
- Text that describes or 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 obvious, 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.
Editable attributes of Variables and Functions
- Units
- The units of measurement of a variable, or value returned by a function -- such as "$/year" or "km/hr". It's best to use abbreviations to keep units within about 10 characters.
- Definition
- The 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 detect errors and validate user input. See Check Attribute.
These attributes apply only to functions:
- 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 person or 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.
- 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.
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 from which this model was read from or to which it was last saved.
Nondisplayed attributes of Module
- Contains
- A list of the objects in this module.
- Defaultsize
- The default size for new nodes created in this module. It uses the same format as Nodesize. If empty, it inherits the default size from its parent module. For a Module, it uses the default size from the Analytica initialization.
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 that depicts each object in a diagram.
- Isin
- The parent module of the object -- i.e. the Diagram in which the node appears.
- 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.
- Att_hyperlinkPref
- 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, 2 = Jumps to parent diagram with object selected, 3 = For handles to modules, open the module's diagram with nothing selected. For non-modules, it 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
User Interface State
Att_resultSlicerState:
Att_editSlicerState
NodeFontColor: Controls the font color of a node in a diagram. There is currently no user-interface mechanism to set this, so you must user the Typescript to change the font color. 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, you could change the font color for Secured_Revenues variable to green thus:
NodeFontColor Secured_Revenues : 0,65535,0
Graphing
xyExpr
Contains one external/exogenous value expression. Recognized by Analytica 3.1 and earlier, where the expression for the X value in an XY graph was stored.
Att_exogenousValue
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
These attributes are: Att_xRole, Att_yRole, Att_colorRole, Att_symbolRole, Att_symbolSizeRole, Att_originRole.
They define the graphing pivot in coordination with the reformVal attribute. 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.
Tables
Other
- Att_BrowseOnly
- Att__cloakDefn
- Att_Dirty
- Att_Obfuscated
- Att_recordSet
- See DbQuery for examples of use
- Att_ResultSliceState
- Att_rlm_license
- Att_rlm_licenseobj
- Att_Showable
- Att_whenDisallowed
See Also
- Manage attributes
- Attrib of Obj
- Objects and Values
- Objects and Their Attributes
- User-Defined Attributes
- To edit an attribute
- Attribute panel
- Category: Attributes
- Domain attribute
- Class
- Identifier
- Optimizer Attributes
- Attributes of a function
- Check attribute
- Classes of variables and other objects
- Definitions
Enable comment auto-refresher