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


IDataExtraction.ExtractSchema Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (GeoDatabaseDistributed)  

IDataExtraction.ExtractSchema Method

Extracts schema only from one geodatabase to another geodatabase.

[Visual Basic .NET]
Public Sub ExtractSchema ( _
    ByVal rSDescription As IReplicaDescription, _
    ByVal outputSpatialReference As ISpatialReference _
)
[C#]
public void ExtractSchema (
    IReplicaDescription rSDescription,
    ISpatialReference outputSpatialReference
);
[C++]
HRESULT ExtractSchema(
  IReplicaDescription* rSDescription,
  ISpatialReference* outputSpatialReference
);
[C++]

Parameters rSDescription [in]
rSDescription is a parameter of type IReplicaDescription* outputSpatialReference [in]
outputSpatialReference is a parameter of type ISpatialReference*

Product Availability

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

Remarks

The ExtractSchema method extracts just the schema of the data involved. It also takes a ReplicaDescription object, but in this case it is used to simply define that schema to extract.

The OutputSpatialReference parameter allows you to set the spatial reference of the extracted schema. All spatial data will be assigned this spatial reference. If this parameter is set to nothing, then the spatial reference of the input datasets is used.

When performing an extraction with re-use schema set to TRUE in the ReplicaDescription, setting the spatial reference will result in an error.

Unlike CheckOut, DataExtraction can copy data from a personal or file geodatabase to an ArcSDE geodatabase or between personal and file geodatabases.

[C#]

    The following shows how to use the OutputSpatial reference parameter:   

        public void Extract_to_utm13(IReplicaDescription repDSetDesc)
{
//Generate the spatial reference for UTM 13N, NAD83
ISpatialReferenceFactory srFact=new SpatialReferenceEnvironmentClass();
IProjectedCoordinateSystem prjCoordSys=srFact.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_NAD1983UTM_13N);
ISpatialReference spRef=(ISpatialReference)prjCoordSys;
spRef.SetDomain(312182, 320772, 4386656, 4395246);
spRef.SetMFalseOriginAndUnits(1,1);
spRef.SetZFalseOriginAndUnits(1,1);
//spRef.SetFalseOriginAndUnits(500000, 0, 1);
//spRef.SetMDomain(0,1);
//spRef.SetZDomain(0,1);
            IDataExtraction dataExtract=new DataExtractionClass();
dataExtract.ExtractSchema(repDSetDesc, spRef);
}

See Also

IDataExtraction Interface