Provides access to members that edit the field properties including raster column definition.
Product Availability
Members
Description | ||
---|---|---|
AliasName | The alias name of the field. | |
AliasName | The alias name of the field. | |
CheckValue | Indicates if the value is valid given the field definition. | |
DefaultValue | The default value of the field. | |
DefaultValue | The default value of the field. | |
Domain | The default domain of the field. | |
Domain | The default domain of the field. | |
DomainFixed | Indicates if the field's domain cannot be modified. | |
DomainFixed | Indicates if the field's domain is fixed. | |
Editable | Indicates if the field can be edited. This should always be set to true. | |
Editable | Indicates if the field is editable. | |
GeometryDef | The geometry definition for the field if IsGeometry is TRUE. | |
GeometryDef | The geometry definition if IsGeometry is TRUE. | |
IsNullable | Indicates if field values can be null. | |
IsNullable | Indicates if the field can contain null values. | |
Length | The maximum length, in bytes, for field values. | |
Length | The maximum length, in bytes, for values described by the field. | |
Name | The name of the field. | |
Name | The name of the field. | |
Precision | The precision for field values. | |
Precision | The precision for field values. | |
RasterDef | The raster column definition. | |
Required | Indicates if the field is required. | |
Required | Indicates if the field is required. | |
Scale | The scale for field values. | |
Scale | The scale for field values. | |
Type | The type for the field. | |
Type | The type of the field. | |
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.
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);
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)