mdlIObject IsValidChildVarname

Determines if the specified 'varname' is valid.

Syntax

mdlIObject_handle IsValidChildVarnamenew_varname

Application

MotionView Tcl Query

Description

This command determines if the specified 'varname' is valid (or not). A variable name can be invalid if it is not unique, or if it contains something other than alphanumeric characters or an underscore.

Inputs

new_varname
The new variable name.

Example

To check to see if the specified 'varname' is valid:
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 pt_handle PointPair pt_1 "\"Point Pair 1\""
myModelName Evaluate
myModelName IsValidChildVarname pt_1 #It returns false
myModelName IsValidChildVarname pt_0 #It returns true
pt_handle ReleaseHandle;
myModelName ReleaseHandle
myClientName ReleaseHandle
myWindowName ReleaseHandle
myPageName ReleaseHandle
myProjectName ReleaseHandle
mySessionName ReleaseHandle

Errors

Returns true if the specified 'varname' is valid, or false if it is not. If there is an error, an error code will be returned.