ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Geometry Namespace / CompositeHVDatumTransformation Class / Create Method / Create(Int32,Boolean) Method
The well-known ID of the hv datum transformation to be created.
(Optional) Default is true. If false, the created transformation is inverted.
Example

In This Topic
    Create(Int32,Boolean) Method
    In This Topic
    Creates a new HVDatumTransformation instance with the given well-known ID and direction, and adds to it a new CompositeHVDatumTransformation instance.
    Syntax
    Public Overloads Shared Function Create( _
       ByVal wkid As Integer, _
       Optional ByVal transformForward As Boolean _
    ) As CompositeHVDatumTransformation

    Parameters

    wkid
    The well-known ID of the hv datum transformation to be created.
    transformForward
    (Optional) Default is true. If false, the created transformation is inverted.

    Return Value

    A new CompositeHVDatumTransformation that contains the created HVDatumTransformation.
    Exceptions
    ExceptionDescription
    The wkid is invalid.
    Example
    Create Composite HV Datum Transformation
    HVDatumTransformation hv1 = HVDatumTransformation.Create(108034);
    HVDatumTransformation hv2 = HVDatumTransformation.Create(108033, false);
    List<HVDatumTransformation> hvs = new List<HVDatumTransformation>() { hv1, hv2 };
    
    // create from enumeration
    CompositeHVDatumTransformation compositehv = 
                    CompositeHVDatumTransformation.Create(hvs);
    int count = compositehv.Count;      // count = 2
    
    List<HVDatumTransformation> transforms = 
                   compositehv.Transformations as List<HVDatumTransformation>;
    HVDatumTransformation tranform = transforms[0];
    // transform.Wkid = 108034
    
    // get inverse
    CompositeHVDatumTransformation inverse_compositehv = 
           compositehv.GetInverse() as CompositeHVDatumTransformation;
    
    // create from xml
    string xml = compositehv.ToXml();
    //At 2.x - CompositeHVDatumTransformation xml_compositehv =
    //      CompositeHVDatumTransformation.CreateFromXML(xml);
    
    var xml_compositehv = CompositeHVDatumTransformation.CreateFromXml(xml);
    
    // create from json
    string json = compositehv.ToJson();
    CompositeHVDatumTransformation json_compositehv = 
        DatumTransformation.CreateFromJson(json) as CompositeHVDatumTransformation;
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also