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


IDatumEdit.Define Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IDatumEdit.Define Method

Defines the properties of a horizontal datum.

[Visual Basic .NET]
Public Sub Define ( _
    [ByRef Name As Object], _
    [ByRef Alias As Object], _
    [ByRef Abbreviation As Object], _
    [ByRef Remarks As Object], _
    [ByRef Spheroid As Object] _
)
[C#]
public void Define (
    ref object Name,
    ref object Alias,
    ref object Abbreviation,
    ref object Remarks,
    ref object Spheroid
);
[C#]

Optional Values

Name   To indicate that this parameter is undefined, first define a variable object Missing=Type.Missing; then pass this in as ref Missing.
Alias   To indicate that this parameter is undefined, first define a variable object Missing=Type.Missing; then pass this in as ref Missing.
Abbreviation   To indicate that this parameter is undefined, first define a variable object Missing=Type.Missing; then pass this in as ref Missing.
Remarks   To indicate that this parameter is undefined, first define a variable object Missing=Type.Missing; then pass this in as ref Missing.
Spheroid   To indicate that this parameter is undefined, first define a variable object Missing=Type.Missing; then pass this in as ref Missing.
[C++]
HRESULT Define(
  VARIANT* Name,
  VARIANT* Alias,
  VARIANT* Abbreviation,
  VARIANT* Remarks,
  VARIANT* Spheroid
);
[C++]

Parameters Name [optional] Name is a parameter of type VARIANT
To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND. Alias [optional] Alias is a parameter of type VARIANT
To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND. Abbreviation [optional] Abbreviation is a parameter of type VARIANT
To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND. Remarks [optional] Remarks is a parameter of type VARIANT
To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND. Spheroid [optional] Spheroid is a parameter of type VARIANT
To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

Product Availability

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

Description

The properties of a datum that you need to set include the name and a spheroid.

[C#]

private void DefineDatum(ISpheroid sphere)
{
    IDatum datum=new DatumClass();
    //Query interface for DatumEdit
    IDatumEdit datumEdit=datum as IDatumEdit;
    //Define the properties of the datum
    //sphere represents an ISpheroid object
    object name="D_North_American_1983";
    object alias="NAD83";
    object abbreviation="NAD83";
    object remarks="NAD83 is the datum";
    object spheroid=sphere;
    datumEdit.Define(ref name, ref alias, ref abbreviation, ref remarks, ref spheroid);
}

[Visual Basic .NET]

    Sub DefineDatum(ByRef pSphere As ISpheroid)
        Dim pDatum As IDatum
        Dim pDatumEdit As IDatumEdit

        pDatum=New Datum
        'Query interface for DatumEdit
        pDatumEdit=pDatum

        'Define the properties of the datum
        'pSphere represents an ISpheroid object

        pDatumEdit.Define(Name:="D_North_American_1983", _
                          Alias:="NAD83", Abbreviation:="NAD83", _
                          Remarks:="NAD83 is the datum", Spheroid:=pSphere)
    End Sub

See Also

IDatumEdit Interface