mdlIObject GetObjectHandleFromSymbol
Gets the handle of an entity using a known symbol (for example, variable name).
Syntax
mdlIObject_handle GetObjectHandleFromSymbolobj_handle, symbol
Application
MotionView Tcl Query
Description
This command obtains the handle of an entity using a known symbol (for example, variable name). This reduces effort and obviates the need to obtain the intermediate child handles.
Inputs
- obj_handle
- The name of the handle to the object.
- symbol
- An identification of the object.
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 InterpretEntity newpt Point test_point "\"Test Point\"";
myModelName InterpretSet SetPoint test_point 50.0 50.0 50.0;
newpt ReleaseHandle;
myModelName Evaluate
myModelName GetObjectHandleFromSymbol obj_hand test_point
obj_hand CutObject
obj_hand ReleaseHandle
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle
hwi CloseStack
Errors
Returns the name of the handle if successful, otherwise an error message.