How to access Network Analyst output sublayers using python

Discussion created by morangm on Nov 9, 2011
Latest reply on Nov 9, 2011 by stacyrendall
I'm trying to figure out how to grab and manipulate Network Analyst output sublayers using python.

For instance, I've successfully run an OD cost matrix calculation using python geoprocessing. I get the "Lines" output sublayer. This is probably just a stupid problem, but I can't seem to figure out how to work with the Lines sublayer (or just what the syntax should be to refer to it) in python after I create it.

I want to:
- Create fields in the Lines layer corresponding to my unique stop ids that I put in the origin and destination sublayers and then join the Lines layer to the origin and destination layers so I can grab the stop ids.
- Export the Lines layer attributes table, including the new fields with the stop id, to a csv

I can do all this by hand, but I want to do it in python, and I'm really stuck.