MapWinGIS:Utils GridReplace

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy

GridReplace

Replaces all occurances of a value in the grid with a new value.
See also Grid


VB.NET Usage

Function GridReplace(Grd As MapWinGIS.Grid, OldValue As Object, NewValue As Object, Optional cBack As MapWinGIS.ICallback) As Boolean

            Parameters

Grd

The grid to replace the specified value in.
OldValue The value in the grid to be replaced with the new value.
NewValue The value to replace the old values with.
cBack The ICallback object which will receive progress and error messages while the old value is being replaced with the new value in the grid.
ReturnValue A boolean value representing the success or failure of replacing the old value with the new value in the grid.

Sample Code

    Private Sub GridReplace()
        Dim grid As New MapWinGIS.Grid()
        Dim oldvalue As Double, newvalue As Double
        Dim utils As New MapWinGIS.Utils()
        Dim success As Boolean
        'Set the value of the old value to be replaced
        oldvalue = 3500
        'Set the value of the new value to be replaced
        newvalue = 3460
        'Replace the old value with the new value in the grid
        success = utils.GridReplace(grid, oldvalue, newvalue, Me)
    End Sub
  

VB 6 Usage
Function GridReplace(Grd As Grid, OldValue As Object, NewValue As Object, Optional cBack As ICallback) As Boolean
            Parameters

Grd

The grid to replace the specified value in.
OldValue The value in the grid to be replaced with the new value.
NewValue The value to replace the old values with.
cBack The ICallback object which will receive progress and error messages while the old value is being replaced with the new value in the grid.
ReturnValue A boolean value representing the success or failure of replacing the old value with the new value in the grid.

Sample Code

    Private Sub GridReplace()
        Dim grid As New MapWinGIS.grid
        Dim oldvalue As Double, newvalue As Double
        Dim utils As New MapWinGIS.utils
        Dim success As Boolean
        'Set the value of the old value to be replaced
        oldvalue = 3500
        'Set the value of the new value to be replaced
        newvalue = 3460
        'Replace the old value with the new value in the grid
        success = utils.GridReplace(grid, oldvalue, newvalue, Me)
    End Sub

Retrieved from "http://mapwindow.org/wiki/index.php/MapWinGIS:Utils_GridReplace"

This page has been accessed 1,150 times. This page was last modified on 9 November 2005, at 17:39.