::mdl3StateEntry

This command creates an mdl3StateEntry widget that is tied to a numerical data member of an existing entity in the model. The mdl3StateEntry widget can accept a scalar numerical value or an equation. When an equation is entered, the equation is stored in the data member as a raw value and the evaluated results are displayed. The entry turns blue to indicate it is an evaluated value.

Syntax

::model::mdl3StateEntry path entityHandle dm eb args

Application

MotionView Tcl GUI

Description

This command creates an mdl3StateEntry widget that is tied to a numerical data member of an existing entity in the model. The mdl3StateEntry widget can accept a scalar numerical value or an equation. When an equation is entered, the equation is stored in the data member as a raw value and the evaluated results are displayed. The entry turns blue to indicate it is an evaluated value.

Inputs

path
The full path to the newly created widget.
entityHandle
A handle pointing to the entity that contains the data member.
dm
The name of the data member that will hold the value.
eb (Optional)
The full path to the EditBar widget. This will default to _NONE_ if nothing is provided.
args
A list of '-' separated flags to configure the mdlFileName's behavior.

Example

To create an mdl3StateEntry widget:
model::GetClientHandle clnt
clnt GetModelHandle mdl
clnt ReleaseHandle
mdl InterpretEntity entPnt Point p_0 "\"Point 0\"" 
mdl ReleaseHandle

set dlg [toplevel .dlg]
set frm [frame $dlg.frm -padx 10 -pady 10]
grid $frm -row 0 -column 0 -sticky nesw

set lbl [ label $dlg.frm.lbl -text "X:" -width 3 -anchor w ]
grid $lbl -row 0 -column 0 -sticky nws

set stEntry  [ ::model::mdl3StateEntry .dlg.frm.stEntry entPnt "x" ]
grid $stEntry  -row 0 -column 1

entPnt ReleaseHandle

Errors

Returns the path to a mdl3StateEntry widget if successful, otherwise an error code.