Command PV GET CELL NAME LIST

4D View

PV GET CELL NAME LIST

version 6.8


PV GET CELL NAME LIST (area; columns; rows; names)

ParameterTypeDescription
areaLongint4D View area
columnsArrayCells column numbers array
rowsArrayCells row numbers array
namesArrayCells names

Description

The PV GET CELL NAME LIST command gets in the names, columns, and rows arrays the names, number of columns and number of rows of cells that have been assigned a name.

Example

The following method will certainly be found in a generic method managing cell names. There is no specific command that allows positioning on a cell using its name, but simply use the command PV GOTO CELL with, as a parameter, an element of each of the $TabColumns and $TabRows arrays corresponding to the position of the desired name in $TabNames:

   C_TEXT($1)  `Name of cell name to go to
   C_LONGINT($Position)  `Position of cell name in list of names
   ARRAY LONGINT($TabColumns;0)  `Column array
   ARRAY LONGINT($TabRows;0)  `Row array
   ARRAY TEXT($TabNames;0)  `Cell name array
   
      `Get names and corresponding coordinates
   PV GET CELL NAME LIST (Area;$TabColumns;$TabRows;$TabNames)

   $Position:=Find in array($TabNames;$1)  `Look for our cell
   If ($Position#-1)  `It exists
      PV GOTO CELL (Area;$TabColumns{$Position};$TabRows{$Position})  `Make it current
   Else
      `Manage possible error
   End if

See Also

PV Get cell name, PV GOTO CELL, PV SET CELL NAME.