Select to view content in your preferred language

IEditSketch help

721
1
06-04-2013 12:32 PM
ChristopherGraf
Occasional Contributor
I am trying to create a polygon and I am having trouble with the IEditSketch3 interface and Geometry IPoint Interface.


Some Relevant code:

pEditSketch = editor

point1 = pActiveview.ScreenDisplay.DisplayTransformation.ToMapPoint(arg.X, arg.Y)

            Try
                pEditSketch.AddPoint(point1, True)

            Catch ex As NullReferenceException

            End Try]


When I run this code I get an "Parameters are incorrect" error on the (pEditSketch.AddPoint(point1, True)) line . I don't see how that can be when I have a point and a Boolean value as parameters.
0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor
Just thinking out aloud here, you are getting your point from the display, but this may be a different projection to the layer you are attempting to to digitize into?
0 Kudos