AnsweredAssumed Answered

Converting Add-In to ArcPro

Question asked by bulla_b on Jul 28, 2017

I'm trying to convert a C# add-in to work with ArcPro.  The online resouces for the SDK seem to be a bit limited, or I just don't understand how to use them.  Can anyone give some guidance on the best way to convert this bit of code?  I cannot seem to find anything related to Geometry.IPoint in the new SDK.

 

public ESRI.ArcGIS.Geometry.IPoint GetMapCoordinatesFromScreenCoordinates(ESRI.ArcGIS.Geometry.IPoint screenPoint, ESRI.ArcGIS.Carto.IActiveView activeView)
{

if (screenPoint == null || screenPoint.IsEmpty || activeView == null)
{
return null;
}

ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = activeView.ScreenDisplay;
ESRI.ArcGIS.Display.IDisplayTransformation displayTransformation =
screenDisplay.DisplayTransformation;

return displayTransformation.ToMapPoint((System.Int32)screenPoint.X, (System.Int32)screenPoint.Y);
}

Outcomes