Difference between revisions of "Manage attributes"

m
m
Line 5: Line 5:
 
<breadcrumbs>Analytica User Guide > Working with Large Models > {{PAGENAME}}</breadcrumbs>  
 
<breadcrumbs>Analytica User Guide > Working with Large Models > {{PAGENAME}}</breadcrumbs>  
  
<nowiki> </nowiki>Each object, such as a variable, module, or function, is a collection of [http://wiki.analytica.com/Attributes attributes]. Some attributes, notably class, identifier, title, and description, apply to all objects of any [http://wiki.analytica.com/Class class]. Others apply only to selected classes. For example, Definition, Inputs, and Outputs apply to Variables and Functions, but not Modules. You can see the Attributes of an object in the [http://wiki.analytica.com/Object_Window Object Window] and in the [http://wiki.analytica.com/Attribute_panel Attribute panel], and edit some of them in Edit mode. This table shows which attributes you can see in these two views for Functions, Modules, and Variables, always, by default, or optionally if you use the Attributes dialog below:  
+
Which attributes
 +
 
 +
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.
 +
 
 +
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 <span style="color:#32CD32">'''✓'''</span>, or '''optional''', marked as +. (Blank means the attribute does not apply to that class of objects.) You can use the [[Attributes dialog]] to select which of the optional Attributes to show:  
  
 
:{| class="wikitable"
 
:{| class="wikitable"
Line 14: Line 19:
 
|-
 
|-
 
|Class
 
|Class
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
|&bull;<nowiki><span style="color:#32CD32">'''</nowiki><nowiki>'''</nowiki><nowiki></span></nowiki>
+
|<span style="color:#32CD32">'''✓'''</span>
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
 
|-
 
|-
 
|Identifier
 
|Identifier
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
 
|-
 
|-
 
|Description
 
|Description
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
 
|-
 
|-
 
|Title
 
|Title
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
 
|-
 
|-
 
|Definition
 
|Definition
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
 
|
 
|
 
|-
 
|-
 
|Units
 
|Units
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
 
|
 
|
 
|-
 
|-
Line 101: Line 106:
 
|
 
|
 
|
 
|
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
 
|-
 
|-
 
|''Created''
 
|''Created''
 
|
 
|
 
|
 
|
| &bull;
+
|<span style="color:#32CD32">'''✓'''</span>
 
|-
 
|-
 
|''File Info''
 
|''File Info''
 
|
 
|
 
|
 
|
| &bull;
+
|<span style="color:#32CD32">'''✓'''</span>
 
|-
 
|-
 
|''Last Saved''
 
|''Last Saved''
 
|
 
|
 
|
 
|
|&bull;
+
|<span style="color:#32CD32">'''✓'''</span>
 
|-
 
|-
 
|User-created (up to 5)
 
|User-created (up to 5)
Line 125: Line 130:
  
 
Key:
 
Key:
: plain = editable by user       
+
: plain editable by user       
: ''italic'' = set by Analytica             
+
: ''italic'' set by Analytica             
: &bull; = always displayed
+
: <span style="color:#32CD32">'''✓'''</span> always displayed
: + = optionally displayed
+
: + optionally displayed
 
 
For descriptions of the attributes, see [[Glossary]].
 
  
 
=== Attributes dialog ===  
 
=== Attributes dialog ===  
Line 140: Line 143:
  
 
* '''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
 
* '''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 ===  
 
=== 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 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.
  
Line 160: Line 165:
 
# Edit the name of the attribute in the ''Title'' field.
 
# Edit the name of the attribute in the ''Title'' field.
 
# Click the '''Rename''' button.
 
# Click the '''Rename''' button.
 
=== Refer to the value of an attribute ===
 
You can access the value of an Attribute in a definition using this construct:
 
 
===== ''Attrib'' Of x =====
 
Returns the value of attribute «attrib» of object «x», where «x» is a variable, function, module, or other object. For most attributes, including ''Identifier, Title, Description, Units, Definition'', and user-defined attributes the result is a text value. For ''Value'' and ''Probvalue'', the result is the value of the variable (deterministic or probabilistic, respectively). For ''Inputs, Outputs,'' and ''Contains'' (an attribute of a module), the result is a vector of variables. See [[Attrib of Obj]]().
 
 
You cannot refer to an attribute of a variable by naming the variable in the definition of that variable because that would create a circular reference. Instead, refer to it as [[Self]], for example:
 
:<code>Variable Boiling_point</code>
 
:<code> Units: F</code>
 
:<code>Definition: If (Units of Self) = 'C'</code>
 
::<code>THEN 100 ELSE 212</code>
 
:<code>Boiling_point &rarr; 212 </code>
 
 
;Library: Special
 
 
;Example: <code>Units of Time &rarr; 'Years'</code>
 
 
<tip title="Tip">Changes to attributes other than [[Definition]] do not automatically cause recomputation of the variables whose definitions refer to those attributes. So, if you change Units of <code>Boiling_point</code> to <code>C</code>, the value of <code>Boiling_point</code> does not change until <code>Boiling_point</code> is recomputed for some other reason.</Tip>
 
  
 
== See Also ==
 
== See Also ==

Revision as of 01:00, 15 September 2016


Which attributes

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.

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 to select which of the optional Attributes to show:

Attribute Variable Function Module
Class
Identifier
Description
Title
Definition
Units
Help + + +
Domain +
Inputs + +
Outputs + +
Domain +
Value +
Probvalue +
MetaOnly +
Parameters +
Recursive +
Check + +
Author
Created
File Info
Last Saved
User-created (up to 5) + + +

Key:

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


Comments


You are not allowed to post comments.