mdlIDataMember Evaluate

Evaluates the data member to update the new values.

Syntax

mdlIDataMember_handle Evaluate

Application

MotionView Tcl Modify

Description

This command is used to evaluate the expression that is set on a data member (the expression may have references to other entity values also). If such values change, the Evaluate command will re-evaluate the expression and update the value of the data member.

Example

To evaluate a data member and update the values:
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;
mod1 EndChildFastGet
temp ReleaseHandle;
bms ReleaseHandle;
bchld ReleaseHandle;
ch_b1 ReleaseHandle;
mod1 ReleaseHandle
mcl ReleaseHandle;
win1 ReleaseHandle;
pa1 ReleaseHandle;
pro1 ReleaseHandle;
sess1 ReleaseHandle;

Errors

Returns 0 if successful, otherwise an error code.