::IsValidVarname

This command will check all of the characters of the specified variable name to ensure that they are all valid for a MotionView varname. This is a generic test only and does not ensure that the variable name is valid within a particular context. Variable names in MotionView must start with a letter and can contain only letters, numbers and the underscore character.

Syntax

::model::IsValidVarname argVarname

Application

MotionView Tcl

Description

This command will check all of the characters of the specified variable name to ensure that they are all valid for a MotionView varname. This is a generic test only and does not ensure that the variable name is valid within a particular context. Variable names in MotionView must start with a letter and can contain only letters, numbers and the underscore character.

Inputs

argVarname
The variable name that is to be checked for validity.

Example

set argNewText "pt_1"
::model::IsValidVarname $argNewText   # It will return true
set argNewText "pt##_1"
::model::IsValidVarname $argNewText   # It will return false

Errors

On successful execution of the command will return 1 if the varname is valid, otherwise it will return 0.