I would like to know a good way to return the center point of a polygon with the arcgispro sdk.
The labelpoint method on the GeometryEngine class should do it.
The following code will find the labelpoint for the first selected feature.
protected override void OnClick()
//Run on MCT
//get the labelpoint for the first selected feature
var selectedFeatures = ArcGIS.Desktop.Mapping.MapView.Active.Map.GetSelection();
//load into editors inspector to get the shape geometry
var insp = new ArcGIS.Desktop.Editing.Attributes.Inspector();
var selGeom = insp.Shape;
var labelPoint = ArcGIS.Core.Geometry.GeometryEngine.LabelPoint(selGeom);
Retrieving data ...