AnsweredAssumed Answered

ArcObjects: Iterate Through Line, Grab points to create a point geometry

Question asked by Jamari_L_Powers on Mar 31, 2016
Latest reply on Apr 5, 2016 by SEria-esristaff

I am using ArcMap 10.1, ArcObjects 10.1 and C#. I am having trouble capturing a line feature, iterating through the vertices of the line and creating a point geometry from its vertices. I am trying to accomplish this via button click.


In detail, I add in a shapfile to ArcMap. I start an Edit Session. Using the Line tool, I draw a line and finish my sketch. Once I either save the edits or finish editing completely, I want to be able to iterate over the points in the line I just drew and use it to create a point geometry (or create a record for each point in my attribute table under the Shape field)  for each set of points. I can pseudocode this, and know what I want to do but since I'm pretty new to ArcObjects, I'm having trouble starting and grabbing the line to iterate over the points. Any help on this would be greatly appreciated. Thanks in advance.


Of course I understand that this is about a 3-5 step process. Capture line and iterate through vertices, create the geometry for each record, and store in the table. I think just getting started with capturing the line and iterating through it is causing the most confusion.