::GetCurrentSelectionVarname

This command will be used to get the varname of the entity to which the mdlTempListCollector is resolved. The returned value is the varname of the referenced entity for the currently selected type.

Syntax

::model::mdlTempListCollector::GetCurrentSelectionVarname argFrm

Application

MotionView Tcl

Description

This command will be used to get the varname of the entity to which the mdlTempListCollector is resolved. The returned value is the varname of the referenced entity for the currently selected type.

Inputs

argFrm
You need to pass the path of the mdlTempListCollector in the above argument for which you need to get the varname.

Example

set sel_pt "MODEL.P_Global_Origin"
set sel_bd "MODEL.B_Ground"
set sel_type "Body"
set top [toplevel .test]
set colFrm [frame $top.tmpFrm1 ]
pack $colFrm
set types {{Point Point ::sel_pt} {Body Body ::sel_bd}}
set list_col [::model::mdlTempListCollector $colFrm.lcol ::sel_type "$types"]
pack $list_col
# Since the sel_type variable is set to “Body”, B_Ground should be the current selected type
tk_messageBox -message "The varname of the current selected entity is: [::model::mdlTempListCollector::GetCurrentSelectionVarname $list_col]"

Errors

On successful execution of the command, if the mdlTempListCollector is resolved for the current selected entity type, then it will return the varname of the resolved, otherwise nothing is returned.