How do I integrate a in-line variable from modelbuilder into a python script? Specifically, I'm using an iterator, and I'm trying to include the 'name' variable in a python script. I believe the problem is on step four, when I add it to the model as a a script (as shown here).
Script code I'm trying to include looks like this:
pop_rank = 1
rows = arcpy.UpdateCursor ("path_to_dataset", "", "", "", "pop A")
for row in rows:
row.setValue("RANK", pop_rank)
pop_rank += 1
rows.updateRow(row)
Specifically, I'd like to make the "path_to_dataset" into the 'Name' variable from the iterator.
I can pull the path using the 'parse path' model builder only tool, but I'm not sure how to feed that into the Python Script.