::GetNextAvailableVarnameAndLabel

This command will be used to get the next available (not already used) pair of varname and label values for a given base name and base label within a given system.

Syntax

::model::GetNextAvailableVarnameAndLabel argV argL argParent argBaseV argBaseL

Application

MotionView Tcl

Description

This command will be used to get the next available (not already used) pair of varname and label values for a given base name and base label within a given system.

Inputs

argV
This is a variable that will be assigned the value of the next available varname.
argL
This is a variable that will be assigned the value of the next available label.
argParent
This is the system context in which we need to look for the unused next available varname and label pair.
argBaseV
This is the varname that we want to use as the base for the next available varname.
argBaseL
This is the label that we want to use as the base for the next available label.

Example

set var_name ""
set label_name ""
set parent "MODEL"
set base_var "p_"
set base_label "Point "
::model::GetNextAvailableVarnameAndLabel var_name label_name $parent $base_var $base_label
puts $var_name 
puts $label_name

Errors

On successful execution of the command, the two variables will be filled with new varname and label and that label is returned.