A friend and I are creating a walking network and we have run in to a snag. We would like to attribute a cost evaluator to our network dataset using a self determined safety metric. We have the equation set up so that all we need to do is divide a field value based on the length of a route to get our "safety value". We just need to know in the cost field how to write the vb script or other evaluator so that Cost Value=[FieldValue]/"total length of individual route". Each route length will be different once each analysis is run, but we have a length value for each line segment, so we know there should be a way that adds up these pieces for the route for a total route length that can be divided by our field value. It seems like it should be a simple script line or something to put in the field evaluator box. Any suggestions?

We are using Arc10.

We are using Arc10.

However, when I ran the route analysis, the values were dividing each time, and summing all of the individually divided values at the end. I would like each field (my value and the length) to sum first, then divide the two summed fields to produce a value. What would be the VB sript or other relevant code to put in the Prelogic or VB function dialogue box to have them run in this order instead of the order they currently are?