mdlIObject SetLabel

Sets/changes the label of an object.

Syntax

mdlIObject_handle SetLabellabel

Application

MotionView Tcl Modify

Description

This command sets/changes the label of an object.
Note: It is important to escape the inverted quotes " " by using backslash (\) while setting the label.

Inputs

label
The name of the label.

Example

To set the label of a newly created body:
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 b0 Body new_body "\"Body\"";
myModelName GetChildHandle bod new_body
bod SetLabel "\"NewBody\""
bod ReleaseHandle
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle
hwi CloseStack

Errors

Returns 0 if successful, otherwise an error code.