Select to view content in your preferred language

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

1005
3
05-16-2011 01:33 AM
SebastianKrings
Frequent Contributor
Hello,

I am going to get the Sample "Route Layer" http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000041z000000.ht...
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!
0 Kudos
3 Replies
SebastianKrings
Frequent Contributor
so, nobody knows?

maybe just a little discussion about the exception data were not z-aware would be nice

why is it not z-aware in my program and why IS it in the external program?

thanks for any! ideas
0 Kudos
SebastianKrings
Frequent Contributor
theres a new hint I found.
I also tried the analysis with Paris.gsb and OfficeBuilding.gdb.
Paris also throws a exception saying the geometry is not z-aware.
But when using OfficeBuilding.gdb I get the Message geometry is not M-aware because the Offices have z-data I think (the floornumber where they are placed).

additionally I made use of the GPMessageClass:
naSolver.Solve(naContext, gpMessages, new CancelTrackerClass());

but when the Exception is caught gbMessages has no entries.


I get the same result when using the code sample from
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/0001000001zq000000.ht...

I have absolutely no idea whats going wrong.
Thanks for any help.
0 Kudos
SebastianKrings
Frequent Contributor
Yeah, it seems that I'm a soliloquist but I still hope that anyone has an idea.

In the past I did not made a licensecheck before solving the problem, because I was running the program in arcmap where the license should be clear I thought.
Now I put the license check between solving an clicking and it runs *happy*.
But this solves my problem only patially, I want/have to know why it is like it is!

Thanks for any "further" discussion.
0 Kudos