mdlIObject GetParentHandle

Gets back the parent handle from its child.

Syntax

mdlIObject_handle GetParentHandle handle_name

Application

MotionView Tcl Query

Description

This command gets back the parent handle from its child. This is useful when you have forgotten the parent handle name and still want to get the parent handle back.

Inputs

handle_name
The new handle name of the parent handle.

Example

To get the point handle from its x-coordinate handle and then use this new handle to get the y-coordinate handle:
Note: Load the slider_crank.mdl model file before running this example.
hwi OpenStack
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 GetChildHandle point_handle p_sp
point_handle GetChildHandle xhandle x
set xval [xhandle GetEvaluatedValue]
xhandle SetRawExpression " [expr $xval + 20]"
xhandle GetParentHandle pt_handle
pt_handle GetChildHandle yhandle y
yhandle SetRawExpression "[expr [yhandle GetEvaluatedValue] + 30]";
yhandle ReleaseHandle;
xhandleReleaseHandle;
point_handle ReleaseHandle;
pt_handle ReleaseHandle;
myModelName ReleaseHandle;
myClientName ReleaseHandle;
myWindowName ReleaseHandle;
myPageName ReleaseHandle;
myProjectName ReleaseHandle;
mySessionName ReleaseHandle;
hwi CloseStack

Errors

Returns the handle of the parent object.