Reference Guide > T Routines > TmDynamicDisplay Procedure
  

TmDynamicDisplay Procedure
Displays selected data in all active VDA Tools, provided that the VDA Tools can display the related variable(s).
Usage
TmDynamicDisplay, indices
Parameters
indices—An associative array containing the names of one or more selected variables and the indices that were selected for each variable. This associative array is built by the TM_SELECTED_DATA method procedure. The variable names are the associative array keys and the indices are the associative array’s values.
Keywords
None.
Discussion
If you want the data that is selected in one VDA Tool to be automatically selected (and highlighted) in other VDA Tools, use the routine TmDynamicDisplay.
TmDynamicDisplay is used in conjunction with the TM_DATA_SELECTION method. Whenever data is selected in a VDA Tool, the TM_DATA_SELECTION method procedure is called. You must decide what action this method procedure takes. For instance, if you want the data selection to appear in all active VDA Tools that can display the selected variable, then the method procedure must do the following:
*Build an associative array containing the names of all the selected variables and the selected indices for each variable.
*Call TmDynamicDisplay.
TmDynamicDisplay then does the following:
*Uses the keys and values of the associative array to set the
GLOBAL.VARIABLE.INDICES attribute for each selected variable.
*Uses the keys of the associative array to identify which active VDA Tools contain the selected variables.
*Executes the TM_DISPLAY method procedure for each of these identified VDA Tools where TM_DISPLAY is set. (The TM_DISPLAY method procedure must query the GLOBAL.VARIABLE.INDICES attribute to get the indices to display for each variable.)
*For instance, you can use the TmGetAttributes function to return the indices (a 200-element array):
INFO, TmGetAttribute('GLOBAL', 'X', 'INDICES')
Array(199)
If the TM_SELECTED_DATA method procedure calls TmDynamicDisplay, the method procedure must distinguish among four possible cases:
*No Selection—If no data was selected, then the TM_SELECTED_DATA method procedure returns an empty associative array. When TmDynamicDisplay is called, nothing happens.
*Single Point Selection—If a single point is selected, then the array built by the TM_SELECTED_DATA method procedure contains the name of one variable (the key) and a single integer (the value). When TmDynamicDisplay is called, the selected point is highlighted in every active VDA Tool that is associated with the selected variable.
*Multiple Point Selection—If more than one data point is selected, the array built by the TM_SELECTED_DATA method contains the name of each selected variable and the selected indices from each selected variable. When TmDynamicDisplay is called, the data is highlighted in every active VDA Tool that is associated with the selected variable.
*Area Selection—In some VDA Tools, such as image display tools, it makes more sense to pass the coordinates of the selection rectangle, rather than all of the selected points, to TmDynamicDisplay. In this case, the associative array contains the selected variable(s) and corresponding 2x2 arrays containing the upper-left and lower-right vertices of the selection rectangle. When TmDynamicDisplay is called, the selected region is highlighted in every active VDA Tool that is associated with the selected variable.
Example
indices = ASARR(var_name, index)
TmDynamicDisplay, indices
See Also
ASARR

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.