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 />

Dim plyFeatLayer As IFeatureLayer<br />

Dim plyFeatClass As IFeatureClass<br />

Dim plyFeatureCursor As IFeatureCursor<br />

Dim plyFeat As IFeature<br />

Dim plyLayerFields As IFields<br />

Dim plyRateField As IField<br />

Dim plyAcreField As IField<br />

Dim plyTable As ITable<br />

Dim plyRow As IRow<br />

Dim plyAcField As Long<br />

Dim plyRtField As Long<br />

Dim dlbAcre As Double<br />

Dim Fld As Long<br />

Dim i As Long<br />

Dim b As Long<br />

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

*** Set pDoc = ThisDocument Set active map layer.<br />

Set pMap = pDoc.Maps.Item(0)<br />

Set unknFeatLayer = pMap.Layer(1)<br />

Set unknFeatClass = unknFeatLayer.FeatureClass<br />

If unknFeatClass.ShapeType = esriGeometryPolygon Then<br />

Set plyFeatLayer = unknFeatLayer<br />

Else<br />

MsgBox "No Polygon Feature Class Loaded in the Map Document", vbExclamation, "No Polygon Feature<br />

Class"<br />

Exit Sub<br />

End If<br />

Set plyFeatClass = plyFeatLayer.FeatureClass<br />

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

*** Set plyLayerFields = plyFeatClass.Fields Search active<br />

layer’s<br />

Fld = plyFeatClass.Fields.FieldCount - 1 attribute table for<br />

For i = 0 To Fld desired data.<br />

Set plyAcreField = plyFeatClass.Fields.Field(i)<br />

If plyAcreField.Name = "ACRES" Then<br />

Set plyAcreField = plyLayerFields.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 ACRES Field in the table!", vbOKOnly, "No ACRES Field"<br />

End If<br />

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

*** i = 0 Search active<br />

layer’s<br />

b = 0 attribute table for<br />

For i = 0 To Fld space to record data.<br />

Set plyRateField = plyFeatClass.Fields.Field(i)<br />

If plyRateField.Name = "Acres_Rate" Then<br />

Set plyRateField = plyLayerFields.Field(i)<br />

i = Fld<br />

b = i<br />

Else<br />

24

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

Saved successfully!

Ooh no, something went wrong!