02

05

每日一记 - FindField

用途: 从field name 查找field index

 

说明原文:
 

FindField Method

 

Finds the index of the named field in the fields collection.

Syntax

object.FindField (Name )

The FindField method syntax has the following object qualifier and arguments:

Part Description
object An object expression that evaluates to an object in the Applies To list.
Name Required. A string expression that represents the Name.

Return Value

Long

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

If FindField returns -1, the Field could not be found in the Fields collection.

 

FindField Example

  

Dim i As Integer
Dim pFields As IFields
Dim pField As IField

'Get Fields
Set pFields = pFeatClass.Fields

'Find the field named "average_income"
i = pFields.FindField("average_income")

'Set the current field
Set pField = pFields.Field(i)

'Delete field from featureclass
pFeatClass.DeleteField pField

 




[本日志由 独木舟 于 2009-02-05 01:50 AM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: GIS
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.