ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / Coordinate3D Structure / SetComponents Method
The value of the X-component.
The value of the Y-component.
The value of the Z-component.
Example Version

SetComponents Method (Coordinate3D)
Sets the components of the Coordinate3D.
Syntax
public void SetComponents( 
   double x,
   double y,
   double z
)

Parameters

x
The value of the X-component.
y
The value of the Y-component.
z
The value of the Z-component.
Example
Getting vector inclination
Coordinate3D v = new Coordinate3D(0, 0, 7);
double inclination = v.Inclination;         // inclination = PI/2

v.SetComponents(-2, -3, 0);
inclination = v.Inclination;                // inclination = 0

v.SetComponents(0, 0, -2);
inclination = v.Inclination;                // inclination = -PI/2
Getting vector azimuth
Coordinate3D vector = new Coordinate3D(0, 7, 0);
double azimuth = vector.Azimuth;      // azimuth = 0

vector.SetComponents(1, 1, 42);
azimuth = vector.Azimuth;
double degrees = AngularUnit.Degrees.ConvertFromRadians(azimuth);       // degrees = 45

vector.SetComponents(-8, 8, 2);
azimuth = vector.Azimuth;
degrees = AngularUnit.Degrees.ConvertFromRadians(azimuth);              // degrees = 315
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also