TOC PREV NEXT INDEX

OMget_real_val, OMset_real_val, OMget_name_real_val, OMset_name_real_val

Synopsis


int OMget_real_val (OMobj_id object_id,
double *value );
int OMset_real_val (OMobj_id object_id,
double value );
int OMget_name_real_val (OMobj_id object_id,
OMobj_name subobject_name,double *value );
int OMset_name_real_val (OMobj_id object_id,
OMobj_name subobject_name,double value );
int OMXobj::get_real_val( double *value );
int OMXobj::set_real_val( double value );

Description

These routines get and set a floating-point object's value.The routines access the target object in different ways.
The routines...
access...
OMget_real_val OMset_real_val
An object identified by id
OMget_name_real_val OMset_name_real_val
A named subobject of an object
OMXobj::get_real_val OMXobj::set_real_val
The OMXobj whose method is being called
In a get routine, if the object's value parameter is a connection or expression, AVS/Express resolves it and returns the result.

Arguments

object_id
The id of an object.
subobject_name
The name of one of object_id 's immediate subobjects.
value
In OMget_real_val and OMget_name_real_val, an output argument containing the object's value.In OMset_real_val and OMset_name_real_val, an input argument specifying the new value.

Returned value

The status code (see Return Status ).

Example 1


/* Get and set object var1_id's value. */
OMobj_id _var1_id;
int status;
double_var1_value;
...
status = OMget_real_val(var1_id, &var1_value);
if (status == 1) {
var1_value *= 2;
status = OMset_real_val(var1_id, var1_value);
}

Example 2


/* Get the value of object x, a floating-point subobject of
__grp1_id. */
OMobj_id _grp1_id;
int status;
double_x_value;
...
status = OMget_name_real_val(var1_id, OMstr_to_name("x"),
&x_value);

See Also

none.

TOC PREV NEXT INDEX