I am fairly new to Arc Programming and am currently using .net to build my tool.

There is not much back ground information as I am starting from a Blank Map. The goal of my tool is just to create a short cut (Hotkey) feature in order to place perpendicular lines.

I am attempting to use the function, IConstructPoint2.ConstructPerpendicular() but it requires that I use ISegment as an input.

Prior to this, the only EVENT I am using to capture the points that I place on the map are IEditEvents2.OnVertexAdded(IPoint). How can I capture the line segment that is constructed immediately after putting down a second point on the map?


Try casting the editor to IEditSketch3, then cast IEditSketch3.Geometry to an ISegmentCollection, and get the first segment.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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