Tag Archives: add

Adding a field to the attribute table in ArcGIS

Dim pMyField3 As IFieldEdit
Set pMyField3 = New Field

With pMyField3
.Name = “Topo”
.Type = esriFieldTypeDouble
End With

Dim pTable3 As ITable
Set pTable3 = pFeatureLayer
pTable3.AddField pMyField3


VBA Collection: substitute an item at position j

WHAT! VBA collection does not allow you to alter an item!!!
And its Array object is weird. I still have not found out how to use it yet.

To substitute an item in a VBA collection, make this call:

pFeat.Add Item:=”Item”, Before:=j
pFeat.Remove j + 1