Measuring routes in python

Discussion created by sbwilson on Nov 19, 2013
Latest reply on Nov 19, 2013 by rfairhur24
Is it possble to measure a route for an M enabled polyline feature class using python. I want to measure a route cosisting of river sections. Each arc is from one river confluence to the next. I want to measure all arcs that make up a river. The rivers have a unique number for each river including all arcs from the river source to the coast. I have written a script using the CreateRoutes tool (from linear referencing) but this merges all the river arcs. I tried using this tool in a loop using a cursor to measure each arc individually which was successful but it does not retain the attributes of the input feature class. Is there another way of measuring or setting the M values for a line?