sujay.garapatis

Fields

Discussion created by sujay.garapatis on Mar 1, 2011
Latest reply on Mar 2, 2011 by sujay.garapatis
Hi i am trying to add field using GP in Arcengine  but i am unable to add can anyone help me out of this below is the code i am  struggling with,thanks in advance

Private Sub pAField_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pAField.Click

        Dim pinput As String = TextBox1.Text
        TextBox1.Text = pinput
        Dim pname As String = TextBox2.Text
        TextBox2.Text = pname
        Dim palias As String = TextBox3.Text
        TextBox3.Text = palias
        Dim ptype As String = ComboBox1.Text
        ComboBox1.Text = ptype

        Dim plength As Integer = Convert.ToInt32(TextBox4.Text)

        Dim pFScale As String = Convert.ToInt32(TextBox5.Text)

        Dim pPrecsion As String = Convert.ToInt32(TextBox6.Text)


        Dim Pfield As New AddField(pinput, pname, ptype)
        With Pfield
            .field_alias = palias
            '.field_type = ComboBox1.SelectedText.ToString
            .field_length = plength
            .field_scale = pFScale
            'field_precision = pPrecsion
        End With
        Dim GP As ESRI.ArcGIS.Geoprocessor.Geoprocessor = New ESRI.ArcGIS.Geoprocessor.Geoprocessor()
        GP.Execute(Pfield, Nothing)
        MessageBox.Show("Completed")


    End Sub

Outcomes