1

I'm trying to assign the number of crashes (points) found in a buffer to the line segment found in the same buffer. I need to iterate through the rows of the buffer feature class. I have the model built, all i need to do is figure out how to pass the number of selected crashes (Get count) into the Calculate field in the line feature class.

See the attachment of the model I have built.

enter image description here

I know very little Python. I'm using ArcGIS 10.5 Advanced license.

2

All you need to do is use %Row Count% as the expression in calculate field. Model Builder uses a concept of inline variables which update during the running of the model (through iteration etc. - http://desktop.arcgis.com/en/arcmap/10.3/analyze/modelbuilder/a-quick-tour-of-using-inline-variable-substitution.htm). These are designated through % signs bookending the variable.

Here's somebody asking for essentially the same information on the ESRI community forum a couple of years ago that I dug up (https://community.esri.com/thread/161327). It seems like there's plenty of documentation of inline variables but not many cases of people explicitly advising that this is the nature of the Row Count variable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.