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


IFeatureWorkspace.CreateFeatureDataset Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (GeoDatabase)  

IFeatureWorkspace.CreateFeatureDataset Method

Creates a new feature dataset.

[Visual Basic .NET]
Public Function CreateFeatureDataset ( _
    ByVal Name As String, _
    ByVal SpatialReference As ISpatialReference _
) As IFeatureDataset
[C#]
public IFeatureDataset CreateFeatureDataset (
    string Name,
    ISpatialReference SpatialReference
);
[C++]
HRESULT CreateFeatureDataset(
  BSTR Name,
  ISpatialReference* SpatialReference
);
[C++]

Parameters Name [in]
Name is a parameter of type BSTR SpatialReference [in]
SpatialReference is a parameter of type ISpatialReference*

Product Availability

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

Errors Returned

FDO_E_CANNOT_CREATE_LOW_PREC_DATASET_IN_HIGH_PREC_DB: Cannot create a low precision dataset in a high precision database.

FDO_E_CANNOT_CREATE_HIGH_PREC_DATASET_IN_LOW_PREC_DB: Cannot create a high precision dataset in a low precision database.

Functional License Check

If your application/site is not appropriately licensed, CreateFeatureDataset can return an error of FDO_E_NO_SCHEMA_LICENSE.

Remarks

The CreateFeatureDataset method can be used to create a new FeatureDataset given its name and spatial reference. Methods supported by the returned feature dataset allow creation of feature classes in the feature dataset.

If the workspace the FeatureDataset will be created in is a pre-9.2 Geodatabase, you must ensure the spatial reference is a low precision spatial reference.  9.1 and earlier versions of the Geodatabase only support low precision spatial references, while 9.2 Geodatabases require high precision spatial references.  Use IControlPrecision2::IsHighPrecision to manage the precision level of the spatial reference used to create the FeatureDataset.  Use the IGeodatabaseRelease interface to determine the release of the geodatabase

See Also

IFeatureWorkspace Interface

.NET Related Topics

Creating feature datasets