Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In an ArcMap extension, I need to flip multiple lines from a selection.

The ArcMap Flip button only allows you to flip one feature at a time.

What's the ArcObjects equivalent to ArcMap's Flip button?

enter image description here

share|improve this question
up vote 7 down vote accepted

ICurve.ReverseOrientation should do what you want.

Actually there is a full snippet Flip Line Direction Snippet , available in the ESRI online documentation.

Here is a small extract from it:

ESRI.ArcGIS.Geometry.ICurve curve = feature.Shape as ESRI.ArcGIS.Geometry.ICurve;
feature.Shape = curve;
share|improve this answer
Thanks! By the way, there's an error in the Flip Line snippet. the line "if(!(feature is ESRI.ArcGIS.Geometry.ICurve))" should be "if(!(feature.Shape is ESRI.ArcGIS.Geometry.ICurve))" – Goldorak84 Jan 9 '13 at 19:06
@Goldorak84 - yes thats correct..quite a few of them are lurking in the samples :) – vinayan Jan 10 '13 at 5:16
@vinayan I am trying to accomplish the same thing, but in VB.NET. Were you able to use ReverseOrientation while editing, that is, in an active edit session, not by starting an edit operation programatically? – Barbarossa Jun 19 '15 at 2:35
@Barbarossa I did use ReverseOrientation inside an active edit session. However, I "StartEditOperation" (which starts a bunch of edits within an actual edit session) on the Editor object is mandatory. Otherwise, it would mess up your undo stack. What prevents you to use that method? – Goldorak84 Jun 22 '15 at 17:46
Thank you for the response. I was not considering the undo stack. Everything is functioning properly now. – Barbarossa Jun 22 '15 at 21:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.