Tuesday, January 4, 2011

Simplify and the ArcEngine license

 

So I have tried to make my code simplify the IPolyline result I had by:

        public static IPolyline CreatePolyline(params MapPoint[] points)

        {

            IPolyline polyline = new PolylineClass() { SpatialReference = CreateWgsSpatialReference() };

 

            foreach (var point in points)

            {

                polyline.AddPoint(CreatePoint(point));

            }

            ((ITopologicalOperator)polyline).Simplify();

 

            return polyline;

        }

 

 

The Unit Test that test this part of code won't pass, a pop up pops up:

image

---------------------------

Initialization Error

---------------------------

The runtime application type must be specified before license initialization.

---------------------------

OK  

---------------------------

 

And the different frameworks for unit tests show the same kind of error:

Resharper shows that test as Aborted:

image

VSTS shows that test as Error:

image

image

I think this means that Simplify won't work with ArcEngine license but tell me what you think.