variable modify

Allows the modification of an existing Adams View variable.
An Adams View variable is analogous to a variable in a programming language. It represents a typed storage location that can contain data (e.g. real numbers, integer numbers, text strings, etc.).

Format:

 
variable modify
Variable_name =
.model_name.var_name
New_variable_name =
.model_name.var_name
Comments =
string
Real_value =
real
Units =
string
Range =
real
Allowed_values =
yes/no
Delta_type =
ABSOLUTE/RELATIVE/PERCENT_RELATIVE
Use_range =
Yes/No
Use_allowed_values =
Yes/No
Integer_value =
integer
String_value =
string
Object_value =
existing entity
Index =
integer

Example:

 
variable modify &
variable_name =
numbers &
new_variable_name =
real_numbers &
real_value =
7.0,8.0,9.8 &
range =
0,10 &
use_range =
yes

Description:

 
Parameter
Value Type
Description
Variable_name
String
Specifies the name of the variable to modify.
New_variable_name
String
Specifies the new name to be used for the Adams View variable. You may use this name later to refer to this variable.
Comments
String
Allows you to store a multi-line comment describing the Adams View variable.
Real_value
Real
Assigns a real number to be stored in this Adams View variable.
Units
String
Allows you to specify the type of units to be used if the variable is defined to be an object only.
Range
Real, Real
Specifies range of values allowed for this variable.
Allowed_values
Real, Real
Specifies allowed values for this variable.
Delta_type
ABSOLUTE/RELATIVE/PERCENT_RELATIVE
ABSOLUTE default value will be used if this parameter is omitted.
Use_range
Yes/No
Specifies whether the range specified above should be applied on the variable.
Use_allowed_values
Yes/No
Specifies whether the allowed values specified above should be applied on the variable
Integer_value
Integer
Assign an integer number to be stored in this Adams VIEW variable
String_value
String
Assign a string to be stored in this Adams View variable.
Object_value
Existing entity
Assign an existing object to be stored in this Adams View variable.
Index
Integer
Specifies the location at which to store the values in the variable.

Extended Definition:

1. You may identify an Adams View variable by typing its name. If the default model contains any variable you may identify them by entering the Adams View variable name only. You must enter the full name of the variable if its not contained in the default model. For example, if the default model is “pendulum”, you must identify the variable “friction_coeff” in the model “fourbar” by entering “.fourbar.friction_coeff”. You must separate multiple Adams View variable names by commas.
2. Normally entity names are composed of alphabetic, numeric, or ‘_’(underscore) characters, and start with an alphabetic or ‘_’ character. They may be any length. For more information, see Using Extended Names. By enclosing the name in double quotes, you may use other printable characters, or start the name with a numeral. If a name contains characters, or starts with a numeral, you must always quote the name when entering it. Note that you can specify the parentage of an entity (e.g. what part “owns” a marker or a geometry element) when you CREATE it by changing its name. if you enter just the entity name, then the default parent will be assigned by Adams View. If you type the full name, then you may over ride the default parent. In most cases, when creating an entity, Adams View will provide a default name. the default name that Adams View provides will specify the parentage that it has assumed. You may, of course, delete this name and use your own. The form of a full name is:
“…._NAME.GRAND_PARENT_NAME.PARENT_NAME.ENTITY_NAME”
The number of levels used varies from case to case and the parentage must exist before an entity can be assigned to it.
3. The type of an Adams View variable is inferred by the initial value stored in the variable when the variable was crated. The type of an Adams View variable may not be changed after it has been created. For example, if an Adams View variable was created with the REAL_VALUE parameter it mat not contain any other type of data (e.g. integer, string).
4. The range is inclusive, that is if a range of 0,10 is specifies, value of the variable can be 0 through 10. A range can be unset by setting the range values both to the expression (NONE), as in:
Variable modify variable_name = VAR1
Range= (NONE),(NONE)
5. Allowed_Values parameter is mutually exclusive with the RANGE parameter. ALLOWED_VALUES may be unset by setting the allowed values to the expression (NONE), as in:
Varible modify variable_name = VAR1 allowed_values=(NONE),(NONE)
6. You may specify an index value from 1 to N+1, where N is the current number of values in the variable created.
Variable create variable_name = numbers real_value=3,2,1
You can do the following:
Variable modify variable_name = numbers real_value=4,5 index=4 to get the values “3,2,1,4,5” in the variable. Indexing also allows you to replace specific values in the variable as in:
Variable modify variable_name=numbers real_value=10 index=3 to get “3,2,10,4,5” as the resulting contents for “numbers”
7. Since objects can be used in a variety of contexts, Adams View cannot determine what type of units it should have. By telling Adams View what the unit type for this object is Adams View can perform the proper conversions on the values you specify.

Cautions:

1. Adams View variables are not the same as ADAMS variables accessed with the command DATA_ELEMENT CREATE VARIABLE.
2. Adams View will not allow you to have two variables with the same name within a model.