mdlIObject BeginFlatListFastGet
Obtains the list of the entities present in the model based on the entity type specified.
Syntax
mdlIObject_handle BeginFlatListFastGetentity_type, active_state
Application
MotionView Tcl Query
Description
Inputs
- entity_type
- The name of the entity type.
- Body
- Point
- Joint
- Bushing
- Marker
- Graphic
- [active_state] (Optional)
- Boolean flag to list only active entities.
Example
hwi OpenStack
hwi GetSessionHandle sess1
sess1 GetProjectHandle pro1
pro1 GetPageHandle pa1 [pro1 GetActivePage]
pa1 GetWindowHandle win1 [pa1 GetActiveWindow]
win1 GetClientHandle mc1
mc1 GetModelHandle mod1
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 Evaluate;
mod1 EndChildFastGet
bms ReleaseHandle;
bchld ReleaseHandle;
mod1 ReleaseHandle;
mc1 ReleaseHandle;
win1 ReleaseHandle;
pa1 ReleaseHandle;
pro1 ReleaseHandle;
sess1 ReleaseHandle;
hwi CloseStack;
Errors
Returns 0 if successful, otherwise an error code.