mdlIDataMember GetEvaluatedValue

Gets the evaluated value of the expression assigned to the data member.

Syntax

mdlIDataMember_handle GetEvaluatedValue

Application

MotionView Tcl Query

Description

This command returns the evaluated value of the expression assigned to the data member. The expression can also be a constant number or string, in which case it will not be evaluated and the constant value will be returned.

Example

To get the evaluated value of the expression assigned to the data member:
hwi GetSessionHandle sess1
sess1 GetProjectHandle pro1
pro1 GetPageHandle pa1 [pro1 GetActivePage]
pa1 GetWindowHandle win1 [pa1 GetActiveWindow]
win1 GetClientHandle mcl
mcl GetModelHandle mod1
mod1 InterpretEntity temp "Body" b_0 "\"BodyLabel\""
mod1 BeginFlatListFastGet Body
set num_body [mod1 GetNumberOfChildren]
set idx [mod1 GetChildHandleByIdx ch_b1 2]
mod1 GetChildHandle bchld [ch_b1 GetVarname]
bchld GetChildHandle bms mass
set body_mass [bms GetEvaluatedValue];
set new_mass [expr $body_mass + 10];
bms SetRawExpression $new_mass
bms Evaluate;
set body_mass [bms GetEvaluatedValue];
mod1 EndChildFastGet
ch_b1 ReleaseHandle;
temp ReleaseHandle;
bms ReleaseHandle;
bchld ReleaseHandle;
mod1 ReleaseHandle
mcl ReleaseHandle;
win1 ReleaseHandle;
pa1 ReleaseHandle;
pro1 ReleaseHandle;
sess1 ReleaseHandle;

Errors

Returns the evaluated value of the expression that is assigned to the data member. If there is an error, an error code will be returned.