This document is archived and information here might be outdated.  Recommended version.


IFieldEdit2 Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IF > IFieldEdit2 Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (GeoDatabase)  

IFieldEdit2 Interface

Provides access to members that edit the field properties including raster column definition.

Product Availability

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

Members

Name Description
Write-only property AliasName The alias name of the field.
Read-only property AliasName The alias name of the field.
Method CheckValue Indicates if the value is valid given the field definition.
Write-only property DefaultValue The default value of the field.
Read-only property DefaultValue The default value of the field.
Write-only property Domain The default domain of the field.
Read-only property Domain The default domain of the field.
Write-only property DomainFixed Indicates if the field's domain cannot be modified.
Read-only property DomainFixed Indicates if the field's domain is fixed.
Write-only property Editable Indicates if the field can be edited. This should always be set to true.
Read-only property Editable Indicates if the field is editable.
Read-only property GeometryDef The geometry definition for the field if IsGeometry is TRUE.
Write-only property GeometryDef The geometry definition if IsGeometry is TRUE.
Read-only property IsNullable Indicates if the field can contain null values.
Write-only property IsNullable Indicates if field values can be null.
Write-only property Length The maximum length, in bytes, for field values.
Read-only property Length The maximum length, in bytes, for values described by the field.
Read-only property Name The name of the field.
Write-only property Name The name of the field.
Read-only property Precision The precision for field values.
Write-only property Precision The precision for field values.
Read/write property RasterDef The raster column definition.
Write-only property Required Indicates if the field is required.
Read-only property Required Indicates if the field is required.
Write-only property Scale The scale for field values.
Read-only property Scale The scale for field values.
Read-only property Type The type of the field.
Write-only property Type The type for the field.
Read-only property VarType The VARTYPE of the field (e.g. VT_I4).

Inherited Interfaces

Interfaces Description
IFieldEdit Provides access to members that edit the field properties.
IField Provides access to members that return information about the field.

CoClasses that implement IFieldEdit2

CoClasses and Classes Description
Field Esri Field object.

Remarks

IFieldEdit2 provides access to the raster definition of a raster field in a geodatabase. You can set the spatial reference, alias to the raster field and for PGDB, and you can specify whether the field is managed by the geodatabase.  RasterDef is required for a raster field.

[C#]

The following code shows how to add a raster field to a feature class:

// Create a RasterDef.
IRasterDef rasterDef=new RasterDefClass();
rasterDef.Description="Raster Field";
rasterDef.IsManaged=true;
rasterDef.SpatialReference=spatialRef;

// Create a raster field.
IField field=new FieldClass();
IFieldEdit2 fieldEdit2=(IFieldEdit2)field;
fieldEdit2.Name_2="Raster";
fieldEdit2.Type_2=esriFieldType.esriFieldTypeRaster;
fieldEdit2.RasterDef=rasterDef;

// Add the field to the feature class.
featureClass.AddField(field);

[Visual Basic .NET]

The following code shows how to add a raster field to a feature class:

' Create a RasterDef.
Dim rasterDef As IRasterDef=New RasterDefClass()
RasterDef.Description="Raster Field"
RasterDef.IsManaged=True
RasterDef.SpatialReference=spatialRef

' Create a raster field.
Dim field As IField=New FieldClass()
Dim fieldEdit2 As IFieldEdit2=CType(field, IFieldEdit2)
fieldEdit2.Name_2="Raster"
fieldEdit2.Type_2=esriFieldType.esriFieldTypeRaster
fieldEdit2.RasterDef=RasterDef

' Add the field to the feature class.
featureClass.AddField(Field)