::GetCurrentSelectionNodeId
This command gets the node ID for the current selection that is set for the specified mdlTempCollector widget. If the node ID is unavailable or unknown, nothing is returned.
Syntax
::model::mdlTempCollector::GetCurrentSelectionNodeId path
Application
MotionView Tcl GUI
Description
This command gets the node ID for the current selection that is set for the specified mdlTempCollector widget. If the node ID is unavailable or unknown, nothing is returned.
Inputs
- path
- The full path of the mdlTempCollector widget that this procedure is being called for.
Example
namespace eval ::my_test {
variable my_node ""
}
set tl [toplevel .top]
wm geometry $tl 550x100
wm title $tl "::model::mdlTempCollector::GetCurrentSelectionNodeId Example"
grid rowconfigure $tl 2 -weight 1
grid columnconfigure $tl 0 -weight 1
set col [::model::mdlTempCollector $tl.col ::my_test::my_node "Node" "MeshNode" \
-afterResolveFunc ::my_test::onNodePicked]
grid $col -row 0 -column 0 -sticky nesw
proc ::my_test::onNodePicked {} {
set id [::model::mdlTempCollector::GetCurrentSelectionNodeId .top.col]
tk_messageBox -message "Picked node id: $id"
}
Errors
This procedure does not generate any errors, it returns nothing if the selection does not have an associated node ID.