|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > UserInterface > GetBrowserTreeCurrentGridInfo |
available from build: 20160609 |
The command returns useful info from the current Grid being activated in the Browser Tree Page.
call DBWShell("GetBrowserTreeCurrentGridInfo")
The %TMP%\DBWReslt.IN temporary file contains the info about the current Grid.
@CURRENT_ROW |
0: no grid has been activated or no rows available in the current grid |
|---|---|
@GRID_NAME |
the name of the previously activated tab |
@PREVIOUS_GRID_NAME |
the name of the activated tab |
All the grid and column names are in upper case.
Sub Main()
DBWInit(True)
DBWShell("GetBrowserTreeCurrentGridInfo")
currentRow = DBWResult("@CURRENT_ROW")
If currentRow > 0 Then
DBWShell("ActivityConsoleCleanAll")
DBWShell("ActivityConsolePrint ===========================")
gridName = DBWResult("@GRID_NAME")
DBWShell("ActivityConsolePrint Current_grid=" & Replace(gridName," ","|") )
previousGridName = DBWResult("@PREVIOUS_GRID_NAME")
DBWShell("ActivityConsolePrint Previous_grid=" & Replace(previousGridName," ","|") )
DBWShell("ActivityConsolePrint Current_row=" & currentRow)
Set fs = CreateObject("Scripting.FileSystemObject")
Set tfolder = fs.GetSpecialFolder(TemporaryFolder)
Set a = fs.OpenTextFile( tfolder & "\" & "dbwreslt.in" , ForReading)
Dim tokens
Do While a.AtEndOfStream <> True
line = a.ReadLine
if line<>"" Then
If Left(line,1) <> "@" then
tokens = Split( line, "=", 2, 1)
msg = tokens(0) & "=" & tokens(1)
DBWShell("ActivityConsolePrint " & Replace(msg," ","|"))
End if
end if
Loop
a.Close
End If
End Sub