mdlIObject GetUserState
Retrieves the state of an object as set by the user in the checkbox (either checked or unchecked).
Syntax
mdlIObject_handle GetUserState
Application
MotionView Tcl Query
Description
This command retrieves the state of an object as set by the user in the checkbox (either checked or unchecked).
Example
To get the "User State" of a body and model:
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 InterpretEntity body Body b_t "\"Temp\"" P_Global_Origin;
mod1 InterpretEntity bodyg Graphic gra_0 "\"Temp Graphic\"" SPHERE b_t P_Global_Origin 10.0;
tk_messageBox -message "Current state of Graphic: [bodyg GetState]";
tk_messageBox -message "Current User state of Graphic: [bodyg GetUserState]";
tk_messageBox -message "Turn Body from Rigid to Deformable";
mod1 InterpretSet SetFlexbodyComplianceState b_t "DEFORMABLE";
tk_messageBox -message "Current state of Graphic: [bodyg GetState]";
tk_messageBox -message "Current User state of Graphic: [bodyg GetUserState]";
body ReleaseHandle;
bodyg ReleaseHandle;
mod1 ReleaseHandle;
mc1 ReleaseHandle;
win1 ReleaseHandle;
pa1 ReleaseHandle;
pro1 ReleaseHandle;
sess1 ReleaseHandle;
hwi CloseStack;
Errors
Returns the boolean value of the state: true if correct, otherwise false.