Finding all links in a route

1101
13
08-19-2011 05:43 AM
AlistairFord
New Contributor
Hello,

I am trying to do something which I thought would be fairly straightforward but cannot seem to figure it out. I am simply trying to identify all the links in the source feature class which make up the shortest route calculated by Network Analyst. i.e. link the route output to the polyline inputs along which it traverses. Is there an easy way to do this? There doesn't seem to be any common ID between the routes output and the traversal results which make them up.

I have tried searching the traversal result table for the link with the Accumulated cost the same as the Total cost for the route, but despite the figures looking the same in the table, a search by attribute doesn't give me back the link.

Surely I'm missing something here? This doesn't seem like an unusual task to me!

Any help is greatly appreciated,

Alistair
Tags (2)
0 Kudos
13 Replies
JaySandhu
Esri Regular Contributor
Not that add-in directly. You could take the original code (it's in the SDK) and turn it into a standalone executable then be able to call it from Python. At 10.1 we are adding this as a GP tool. So you could sign up for 10.1 beta and try it out!

Jay Sandhu
0 Kudos
JamesSmith5
New Contributor
Not that add-in directly. You could take the original code (it's in the SDK) and turn it into a standalone executable then be able to call it from Python. At 10.1 we are adding this as a GP tool. So you could sign up for 10.1 beta and try it out!

Jay Sandhu


I don't know how to do the bit in bold unfortunately. I've wrote a fairly long process in a python script now, and the only bit is missing is the add traversal bit. 😞

Signing up to be a beta for 10.1 is a bit problematic too - I'm in a large organisation and so don't know our customer number. I'd also have to get our system admin guys to install the beta, which I don't think that they will be keen on really.

Thanks for your help anyway.
0 Kudos
PatrickStevens
Esri Contributor
Unfortunately, there is no easy way to get a traversal result via python at 10.0.  We addressed the issue at 10.1.

To do it at 10.0, your best bet would be to create a custom GP tool.  That way, you could reference it from within the same process as you execute your python script.  There is documentation about custom GP tools in the SDK.  If you are comfortable in geoprocessing and in .NET ArcObjects development, you will create a GP tool using the relevant parts from the traversal result add-in .NET code.
0 Kudos
JamesSmith5
New Contributor
Unfortunately, there is no easy way to get a traversal result via python at 10.0.  We addressed the issue at 10.1.

To do it at 10.0, your best bet would be to create a custom GP tool.  That way, you could reference it from within the same process as you execute your python script.  There is documentation about custom GP tools in the SDK.  If you are comfortable in geoprocessing and in .NET ArcObjects development, you will create a GP tool using the relevant parts from the traversal result add-in .NET code.


That's a bit out of my skill-set unfortunately. I'll have to wait for the 10.1 release. Is there any time-frame for it?
0 Kudos