mdlIObject GetType
Gets the entity/object type.
Syntax
mdlIObject_handle GetType
Application
MotionView Tcl Query
Description
This command gets the entity/object type (Body, Point, Joint, Curve etc). If you have a handle to an entity, this command can be used to get the type of the entity.
Inputs
- resolve_ref
- This can be used for reference entities. By default it is set to false. If this argument is passed as true, the type of entity to which it is referring to will be returned.
Example
To get the entity/object
type:
hwi GetSessionHandle mySessionName
mySessionName GetProjectHandle myProjectName
set activePageNum [myProjectName GetActivePage]
myProjectName GetPageHandle myPageName $activePageNum
set activeWinNum [myPageName GetActiveWindow]
myPageName GetWindowHandle myWindowName $activeWinNum
myWindowName GetClientHandle myClientName
myClientName GetModelHandle myModelName
myModelName GetType
myModelName GetChildHandle body_handle b_piston
body_handle GetType
body_handle GetChildHandle mass_handle mass
mass_handle GetType
mass_handle ReleaseHandle
body_handle GetChildHandle label_handle label
label_handle GetType
label_handle ReleaseHandle
body_handle GetChildHandle cg_handle cg
cg_handle GetType
cg_handle GetChildHandle y_handle y
y_handle GetType
y_handle ReleaseHandle
cg_handle ReleaseHandle
body_handle ReleaseHandle
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle
Errors
Returns the object type if successful. If there is an error, an error code will be returned.