Attributes

(Redirected from DefnState)

(Up to Analytica Reference)

Each Analytica Object consists of a set of Attributes (properties or fields). Every object has a Class, Identifier, and Title. Variables also have a Definition and Domain. You can easily view and edit some attributes in an Object window or the Attribute panel below a Diagram. Other attributes you can see, but not edit directly -- such as, the Value, Inputs and Outputs of a Variable, which Analytica computes from the Definition. Some attributes apply only to a particular object Class -- for example, Author and Creation date apply only to a Model or Module; Parameters and Recursive apply only to a Function. There are also many internal attributes that you don't see directly but may affect how the node looks -- such as, Nodeinfo, NodeSize, and Nodefont. This page first describes common editable Attributes, then non-modifiable Attributes, and finally the many obscure internal Attributes that users rarely need to know about.

Common attributes

These attributes apply to all classes of user-defined objects. You can edit them directly in Edit mode in the Object window and Attribute panel:

Editable Attributes of all Objects

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 the class of a Variable among these subclasses Chance, Constant, Determ, Decision, Index, Objective, Variable. You may change a Module among these subclasses Library, FiledLibrary, Model, Module, FiledModule, or Form. You can change a Text node to a Frame node or back. You can't change the class of a Function, Button, or system object. In the Object window or Attribute panel, in Edit mode, the Class appears as a pulldown menu that lets you change it to another compatible Class.
Identifier
The unique name 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
An expression used to test that the computed result value is valid. If it returns false, it gives a warning. This is helpful to detect errors in user input or complex calculations. See Check Attribute.

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:

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.
Value
The computed value of the variable (not available for functions). May be displayed in Object window, but is not displayed by default.
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.

Editable attributes of Functions

Parameters
A list of the function parameters, enclosed in parentheses. It may include qualifiers that specify what data type or dimension are expected for each parameter, or whether a parameter is optional or may be repeated. It is good practice to also list the main (non-optional) parameters (without qualifiers) in the title, so users can easily see what parameters it expects from seeing the function node in a diagram.
Recursive
A boolean, with value 0 (default) or 1, specifies whether the 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

The Module class includes subclasses Model, Module, Filed Module, Library, Filed Library, and Form. These are attributes of modules that you can see but not edit in the Object window and Attribute panel:

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.

Hidden attributes

There are quite a few hidden attributes that you can't usually see in the standard user interface, and almost never need to think about. If needed you can see them in the Typescript Window. Type "Profile <identifier>" into the Typescript to see all the attributes of an object.

Hidden attributes of Variables and Functions

NumberFormat
The number format parameters specified in the Number Format Dialog for numbers generated in a variable or function. If absent, it uses the default Number Format.
v, format, proxy, zeroes, separators, currency, digits, trailingZeros, currencysymbol, currencyPlacement, datetemplate, fullPrecision, fullDateTemplate, relReqForFullDateTemplate, datesAsNumbers, numbersAsDates, digitsForGeneralFmt
ProbabilityNumberFmt
In a Probability Bands result view, a Cumulative Probability result view, or a Probability mass view for a discrete-valued quantity, probabilities display in addition to values for the underlying variable. For the columns or axes containing probabilities, this attribute holds the number format, which is often different from the underlying variable's number format.
v, format, proxy, zeroes, separators, currency, digits, trailingZeros, currencysymbol, currencyPlacement, datetemplate, fullPrecision, fullDateTemplate, relReqForFullDateTemplate, datesAsNumbers, numbersAsDates, digitsForGeneralFmt
DensityNumberFormat
In a Probability Density Result view for a continuous variable, probability density values appear in addition to values for the underlying variable's quantity. This attribute stores the number format used for columns or axes that display probability densities.
v, format, proxy, zeroes, separators, currency, digits, trailingZeros, currencysymbol, currencyPlacement, datetemplate, fullPrecision, fullDateTemplate, relReqForFullDateTemplate, datesAsNumbers, numbersAsDates, digitsForGeneralFmt
FixedDef
The parse-tree (DCODE) from the Definition. It displays as the code, usually with extra parens.
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
A handle to the module that contains this object. (Null for the top model.)
Aliases
A list of handles to any user inputs or user outputs ([FormNode]]) or Alias nodes for this object. Any object type can have aliases, including Variables, Functions, Modules, and Buttons.
Original
The original node of a user input or user output (FormNode) or Alias node. Aliases attribute contains all the nodes listing it as its Original.

Hidden attributes of Modules

Contains
The list of objects contained in this module.
Defaultsize
The default node size for new nodes in this module. It uses the same format as Nodesize. If empty, it inherits the default size from its parent module. For a Model, it uses the default size from the Analytica initialization.

Node attributes

These attributes apply to the visual node that represents an object in its parent influence diagram. They control the location, size, and appearance of each node. You can modify some in the Diagram view (NodeLocation, NodeSize), some in the Node Style dialog (NodeFont, NodeInfo), or using the Color palette dialog, (NodeColor and NodeFontColor). :

Nodelocation
The location of the node center in its parent diagram, as x,y,z, where x and y are number of pixels rightwards and downwards from the top-left corner of the diagram. You can, of course, modify node location by dragging nodes in their diagram. Nodes are displayed in order of z value, which therefore controls which nodes are displayed in front of other nodes. You can send a node back or to the front by selecting the node and using the Right mouse button menus.
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 the node center to each edge. You can change the size of each node in its Diagram dragging the corner boxes around a selected node. You can define the default node sizes in the Diagram Style dialog.
Nodecolor
The color for this node, as r,g,b, where each color is in the range 0 to 65535. If empty, it uses the default color for this object class. You can modify colors bydirectly by selecting the node in the diagram, and using the Color palette.
NodeFontColor
Controls the font color of a node in a diagram. You can modify it from the Color palette. The attribute is in RGB format, r,g,b, where each color is in the range 0 to 65535.

You can see the effects of Nodefont and Nodeinfo in the parent diagram. You can modify them for each node with the Node Style dialog or set defaults for a model or module with the Diagram Style dialog.

Nodeinfo
This affects how the node appears. It has quite a number of fields, all Boolean -- 0 or 1 -- except widthOfCtrl.
1
inputArrows: set to 1 to show all input influence arrows or 0 to suppress them
outputArrows: set to 1 to show all output influence arrows or 0 to suppress them
label: set to 1 to show the title (or identifier) in the node, or 0 not to.
border: set to 1 to show the thin border around the node, or 0 not to.
fill: set to 1 to fill the node with selected color, or 0 not to.
label: set to 1 to show the title (or identifier) in the node, or 0 not to.
useCustomFont: set to 1 to use the custom font set in NodeFont, or 0 not to.
widthOfCtrl: For a user input or output node, this specifies the width of the field (for a text or choice menu) or the button for other types.
bevel: set to 1 to show a bevel to make the node appear outdented -- default for button nodes -- or 0 not to.
ShowFormIcon: controls whether the little result mode icon (e.g., "Mid") displays to the right of the result button or not.
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, to make the node invisible in its Diagram.
Nodefont
The node font family and size in points, e.g. Bodoni, 16. If empty, it inherits the default font family and size from the parent diagram module.
Att_hyperlinkPref
When an index or result table contains a handle to an object, it shows title of the object as a blue clickable link. When you click a handle link, it shows the object. The number assigned to this attribute controls how it shows the object when you click :
  1. Open its Object window
  2. Open its parent diagram with the node selected
  3. If it's a Module, open its Diagram with nothing selected. Otherwise, Open parent Diagram with the node selected.

The attribute is inherited: If you set this attribute for a Model, it sets the default for all results. If you set it on a module, it sets the default for results inside that module. If you set it for a particular variable, it applies only to that variable.

Pict
An image shown in the node. You can paste an image into a node, or assign an image in standard formats (.png, jpeg, tiff) to the Pict attribute of a node.

Window status attributes

These attributes store the location and size of windows, including the Diagram, Object, and Result window, as applicable to each class of object.

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, buttonStyle, customIcon, titleOnly, crumbs
v is a version number. Should be 2.
x, y in the coordinate of the top-left corner of the window frame when the window is not maximized, relative to the top-left corner of the desk area (the gray background area that starts under the toolbar).
w, h are the width and height of the client area of the window when the window is not maximized. This client are is the area of the window not including the edges around the window, the window title bar, or the attribute panel, but it does include the diagram scroll bars (which have a width and height of 16). In Analytica 4.6 and earlier, the height is from the bottom edge of the title bar to the bottom of the diagram's horizontal scroll bar, and hence, includes the height of the module hierarchy stripe within the total height. In Analytica 5.0, the height starts at the lower edge of the hierarchy stripe -- so it does not include the hierarchy stripe.
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 = Turn off background (i.e., the diagram background will appear white)
  • 16 = Show dynamic dependency arrows
  • 32 = Show arrows for dependencies in the Check attribute
tabs is reserved for a future enhancement (not currently exposed) 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 = (default) Not tabbed
  • 1 = Tabs on top
  • 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)
  • 7 = Tabs hidden (e.g. overlays, controlled via button scripts)
buttonStyle controls how the buttons in input and output nodes display (such as Calc, Edit Table, etc).
  • 0 = Normal text (default in Analytica 5.0)
  • 1 = Bolded text (pre-5.0 standard)
  • 2 = Blank (no label or icon in button)
  • 3 = Icon
  • 4 = Bare Icon
buttonStyle was introduced in Analytica 5.0
customIcon If set to 1, uses the pict of the module or model as the icon for the titlebar.
titleOnly If set to 1, uses the diagram object's title as the titlebar's title without the prefix "Diagram - ".
crumbs If 0, hides the hierarchy bar from this diagram window only (child diagrams unaffected),
customIcon, titleOnly, and crumbs were introduced in Analytica 6.4.
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
v, X, Y, W, H, Graph, U

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 of the area exclusing the title bar and edges (the actual window size is X+15, Y+38), 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.)

DefnState
The location and size of an edit table window.
v, x, y, w, h
OutlinerState
The location and size of the outliner window. This is stored as an attribute of the keyword object named All and is not saved with the model.
v, x, y, w, h
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.
Att_usebyprevindex
???

Internal Engine Attributes

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 Attributes

Att_resultSlicerState:


Att_editSlicerState

Graphing Attributes

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

ver, cat,auto, includezero, log, reverse, incs, min, max, includeSubset, excludeSubset, hideLabels

where:

version : Must be 1 (version)
categorical : Categorical flag (1=force categorical interp), opt.
auto : Full autoscale flag
includezero : force 0 to be in range flag
log : log scaling flag
reverse : reverse order flag
incs : Number of increments
min : minimum value for manually scaled axis
max : maximum value for manually scaled axis
includeSubset : [2,7,8,12] -- include these items (by position) when using manual scaling. Brackets included
excludeSubset : [3,6,13,17] -- exclude these items when using manual scaling.
hideLabels: 1=hide labels for this axis

Att_valueRange

This attribute is usually contained within the GraphSetup attribute (except when Set Default was pressed after configuring the range).

The range for each value is encoded as

ver, cat,auto, includezero, log, reverse, incs, min, max, includeSubset, excludeSubset, hideLabels

where:

version : Must be 1 (version)
categorical : Categorical flag (1=force categorical interp), opt.
auto : Full autoscale flag
includezero : force 0 to be in range flag
log : log scaling flag
reverse : reverse order flag
incs : Number of increments
min : minimum value for manually scaled axis
max : maximum value for manually scaled axis
includeSubset : [2,7,8,12] -- include these items (by position) when using manual scaling. Brackets included
excludeSubset : [3,6,13,17] -- exclude these items when using manual scaling.
hideLabels: 1=hide labels for this axis

For a given variable identifier, there can be a different range for each slice along a comparison index. These are encoded by joining the different range settings using a pipe separator (|) and prefixing each slice range with the slice number and colon. For example:

1,,1,,0,,20|1:1,,0,,1,,,0.01,0.56,0

The first range (1,,1,,0,,20 is for the variable's main value, the second one is prefixed by "1:" and applies to the first comparison slice. In a continuous CDF, PDF or Exceedance plot, this would be the 'X' value (e.g., the probability or density axis), but the 'Y' value is encoded instead on the Graph_*_Valdim system variable.

For common statistical axis, the attribute is set on special system variables with names having the form Graph_*_Valdim, such as Graph_Pdf_Valdim. This encodes the range setting for the PDF's density axis.

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.

Table attributes

  • TableCellDefault: The default value (or Checkbox or Choice expression) used in a new cell of an Edit table when you add or extend an index of that table.

Other attributes

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
Att_PreLoadScript

See Also

Comments


You are not allowed to post comments.