02.06.2013 Views

Baldwin County Wetland Conservation Plan - Alabama Department ...

Baldwin County Wetland Conservation Plan - Alabama Department ...

Baldwin County Wetland Conservation Plan - Alabama Department ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Baldwin</strong> <strong>County</strong> <strong>Wetland</strong> <strong>Conservation</strong> <strong>Plan</strong> Final Summary Document<br />

Set pSpatialFilter.Geometry = pGeometry<br />

pFeatureSelection1.SelectFeatures pSpatialFilter, esriSelectionResultAdd, False<br />

Set pFeature = pFeatureCursor1.NextFeature<br />

Loop<br />

'*********************************************************************************************<br />

***<br />

Dim pCursor As IFeatureCursor Searches for data storage<br />

Dim pFeature2 As Ifeature space.<br />

Dim pSelectionSet As ISelectionSet<br />

Dim pField As IField<br />

Dim pFeatureClass As IFeatureClass<br />

Dim pLayerFields As IFields<br />

Dim pModelField As IField<br />

Dim pTable As ITable<br />

Dim pRow As IRow<br />

Dim pModelField2 As Long<br />

Dim Fld As Long<br />

Dim i As Long<br />

Dim b As Long<br />

Set pSelectionSet = pFeatureSelection1.SelectionSet<br />

pSelectionSet.Search Nothing, False, pCursor<br />

Set pFeatureClass = pFeatureLayer2.FeatureClass<br />

i = 0<br />

b = 0<br />

Set pLayerFields = pFeatureClass.Fields<br />

Fld = pFeatureClass.Fields.FieldCount - 1<br />

For i = 0 To Fld<br />

Set pModelField = pFeatureClass.Fields.Field(i)<br />

If pModelField.Name = "fire" Then<br />

Set pModelField = pLayerFields.Field(i)<br />

i = Fld<br />

b = i<br />

Else<br />

b = 0<br />

End If<br />

Next<br />

If b = 0 Then<br />

MsgBox "There is no fire Field in the table!", vbOKOnly, "No model Field"<br />

Exit Sub<br />

End If<br />

'*********************************************************************************************<br />

***<br />

Set pFeature2 = pCursor.NextFeature Assigns values<br />

Set pTable = pFeature2.Table accordingly.<br />

pModelField2 = pTable.FindField(pModelField.Name)<br />

Do While Not (pFeature2 Is Nothing)<br />

Set pRow = pTable.GetRow(pFeature2.OID)<br />

pRow.Value(pModelField2) = 1<br />

pRow.Store<br />

Set pFeature2 = pCursor.NextFeature<br />

Loop<br />

pMxDoc.ActiveView.Refresh<br />

End Sub<br />

'*********************************************************************************************<br />

***<br />

22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!