ArcObjects Library Reference (Geometry)  

IPoint.PutCoords Method

Sets the X and Y coordinates.

[Visual Basic .NET]
Public Sub PutCoords ( _
    ByVal X As Double, _
    ByVal Y As Double _
)
[C#]
public void PutCoords (
    double X,
    double Y
);
[C++]
HRESULT PutCoords(
  double X,
  double Y
);
[C++]

Parameters

X   X is a parameter of type double Y   Y is a parameter of type double

Product Availability

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

Remarks

Use the IPoint::PutCoords method to set the X,Y coordinates for a Point. The coordinates can also be set by updating the X and Y properties for the point.
Point PutCoords Example
[C#]     private void DefinePoint()
    {
        IPoint point = new PointClass();
        point.PutCoords(0, 0);
        System.Windows.Forms.MessageBox.Show(point.X + ", " + point.Y);
    }

See Also

IPoint Interface

.NET Snippets

Add Graphics Layer to Globe | Get Screen Coordinates from Map Coordinates | Toggle Between Surface and Global Navigation Mode |

.NET Samples

Arranging MOLE graphics using manual decluttering (Code Files: MainForm) | Buffer snap agent (Code Files: BufferSnap) | Controls commands environment (Code Files: CommandsEnvironment) | Create custom move, rotate, and scale GeometricEffects within a single project (Code Files: clsGE_Transform_Rotate clsGE_Transform_Scale) | Decluttering MOLE graphics using leadering and stacking (Code Files: MainForm) | Displaying symbol-based MOLE graphics on a MapControl (Code Files: MoleDisplay) | Dynamic displaytracking dynamic object (Code Files: TrackObject) | Dynamic logo (Code Files: DynamicLogo) | Geodesy MapControl (Code Files: GeodesyMapControl) | Geoevents in a MapControl (Code Files: GeoEvents) | RSS weather layer (Code Files: AddRSSWeatherLayer) | Triangle graphic element (Code Files: TriangleElementClass) | Using MOLE symbol-based graphics with interactive maps (Code Files: MainForm) |

.NET Related Topics

Adjusting feature locations with spatial adjustment | DataSourcesRaster | DefenseSolutions | How to create a multipoint using the ConstructIntersectionEx method | How to create a raster dataset | How to get screen coordinates from map coordinates | How to query an image service | How to rotate the MapControl display | How to use some basic properties and methods on ICircularArc | How to use the ICurve methods | How to work with ICurve methods | Using IGeometryBridge or IGeometryBridge2 | Writing .NET code using methods |