MapWinGIS:Shapefile EditCellValue

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

EditCellValue

Modifies a value in the shapefile attribute table.


VB.NET Usage

Function EditCellValue(FieldIndex As Integer, ShapeIndex As Integer, NewVal As Object) As Boolean

            Parameters

FieldIndex

The index of the field in the table to be modified.
ShapeIndex The index of the shape for which the attribute value is to be modified.
NewVal The new value to store in the table.
ReturnValue A boolean value representing the success or failure of editing the cell value.

Sample Code

    Private Sub EditCellValue()
        Dim sf As New MapWinGIS.Shapefile()
        Dim data As Double
        'Set the value of the data value
        data = 100
        'Enable editing of the Table in the .dbf file
        sf.StartEditingTable()
        'Change the value of the shapefile's attribute table for field 0, shape 0 to 100
        sf.EditCellValue(0, 0, data)
        'Halt editing of the Table in the .dbf file and commit changes
        sf.StopEditingTable(true)
    End Sub
  

VB 6 Usage
Function EditCellValue(FieldIndex As Long, ShapeIndex As Long, NewVal As Object) As Boolean
            Parameters

FieldIndex

The index of the field in the table to be modified.
ShapeIndex The index of the shape for which the attribute value is to be modified.
NewVal The new value to store in the table.
ReturnValue A boolean value representing the success or failure of editing the cell value.

Sample Code

    Private Sub EditCellValue()
        Dim sf As New MapWinGIS.Shapefile
        Dim data As Double
        'Set the value of the data value
        data = 100
        'Change the value of the shapefile's attribute table for field 0, shape 0 to 100
        sf.EditCellValue 0, 0, data
    End Sub

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

This page has been accessed 3,117 times. This page was last modified on 11 July 2006, at 16:34.