0

In C#/ArcObjects, is it possible to get the geometry of the polygon that is used to select features in ArcMap? For example, when you select point features with a polygon, how do you get the geometry of that polygon?

Thank for your help!

baptV
  • 9
  • 2
  • Select by polygon? I don´t know that feature. Which version of ArcMap are you running? mAybe you ment the "select features that intersect/overlap/... the target **feature**"? Anyway you should provide what you´ve tried already. – MakePeaceGreatAgain Sep 21 '18 at 14:41
  • Thank you for your answer. I'm talking about this : https://i.stack.imgur.com/xaTW6.png I'm running ArcMap 10.4 – baptV Sep 21 '18 at 14:48
  • Wow, didn´t know that feature. – MakePeaceGreatAgain Sep 21 '18 at 14:51
  • I suppose you´d have to write your own editor-extension in order to react on ArcMap-events. However that goes far bayond a simple question on StackOverflow. – MakePeaceGreatAgain Sep 21 '18 at 14:54
  • I guess you can't. The only way I see is to write your own polygon selection tool. Making custom tool: http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/ec9c3bf9-1bae-4d56-9ae6-e439dbd0f18f.htm - Making Polygon Feedback: http://resources.esri.com/help/9.3/ArcGISEngine/ArcObjects/esriDisplay/INewPolygonFeedback.htm – Malior Jan 03 '19 at 09:28

1 Answers1

0
IMxDocument doc = ArcMap.Document;
IMap map = doc.FocusMap;

selectedPolygon = map.SelectedObjects(new List<esriGeometryType> {
    esriGeometryType.esriGeometryPolygon
});
Das_Geek
  • 2,775
  • 7
  • 20
  • 26
qixmiers
  • 1
  • 2
  • 2
    Please edit your post to include an explanation of your code. This will make your answer more useful and more likely to be upvoted :) – Das_Geek Oct 08 '19 at 18:19