RouteLayer as ArcMap Add-In  -  the geometry is not z-aware  - c#

Discussion created by Kaspatoo on May 16, 2011
Latest reply on May 25, 2011 by Kaspatoo

I am going to get the Sample "Route Layer" http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000041z000000.htm
running as ArcMap Add-In.

The sample makes use of SanFrancisco.gdb (SafeWay Supermarkets). The orginal programm is a standalone with its own main and is not using arcmap or anything else, just its licenses to perform.

The Licence Initialising is what I have removes when using as Add-In.
In ArcMap when clicking on the command button, an instance of the program (instead of the main mathod) is initialized an the solveRoute Method will be executed.
everything runs as expected but then it crashes on calling
naSolver.Solve(naContext, new GPMessagesClass(), new CancelTrackerClass());

The error is
the geometry is not z-aware

All Properties are the same, I use the same GDB. The only differences are that I do not make use of a main method and the license initializer is not used.

I am searching for this error on google and read that this error occurs when the amount of calculating is too large. But there are 25 stops and they are calculated as well on the single program.

Do anyone have an idea how to solve the problem? Would be very nice. Thanks a lot!