Hello all! I've attached a screenshot of my working model. I'm hoping that I'm not way off on this one but I know for sure that a few sections need to be cleaned up or automated.
Essentially what I am trying to do is:
Here are my questions:
Any help is greatly appreciated! If any of this is not clear do not hesitate to ask for clarification. I know this is rather complicated to explain but my main issue is how to utilize multiple summary statistic variables to calculate standardization scores and automate field adding/calculating.
I have moved this to the Modelbuilder place to get a targeted audience. Geonet Help is for help on using GeoNet
I think you've found yourself at the point where abandoning ModelBuilder and learning Python will greatly benefit your workflow, if this is possible in ModelBuilder at all (in fact, it may benefit all future workflows, too). Since you already have a mostly functional model, you can get a head start by exporting your model to a Python script.
Learning Python is a bit of a steep curve, although not as bad as some languages, so you will have to do some work on your own.
As a start, you will likely begin with a list of input layers, whether hard-coded or used as a script tool parameter. From that list, you get the number of items in the list or iterate through each item in the list (for example, you could add/calculate a field each time through the loop):
>>> masterFC = "points" ... fcs = ["First_Lyr","Second_Lyr","Third_Lyr"] ... print len(fcs) ... for fc in fcs: ... print fc ... arcpy.AddField_management(masterFC,fc,"TEXT","","",20) ... arcpy.CalculateField_management(masterFC,fc,"\"" + fc + "\"") ... 3 First_Lyr Second_Lyr Third_Lyr
Like Darren Wiens says you are at a spot where you would need to move to code to get where you want to go. I would just like to add to what he said with, if this is your first time working with code break it into small pieces. This will make it easier to understand what is happening and helps you keep track of what's working and what's not.
Thanks for the responses Darren and Wes!
I was afraid this was the case but I figured it was worth asking regardless. Can either of you suggest a good resources for learning Python scripting? I have some experience but that was a few years ago so I'm basically starting from scratch with this.
Thanks again!
There's no concensus for best way to learn Python, but here are the GeoNet search results - you'll have to find what works best for you (book, online, etc.)
One excellent book is published by ESRI, called "Python Scripting for ArcGIS," by Paul Zandberger, ISBN 978-158948-282-1 (first ed. 2013).
cheerio
Cole... Modelbuilder works well ... until one starts editing the model and moving things around on screen. Even though the 'picture' looks good, if you examine the order of your processes when editing the model, you will often find things get out of order, so everything is nicely coloured and linked, until you try to run it again. I have recommended in the past (see examples on my blog) of using the Results window to begin learning how to construct scripts that work. If you can run a tool from arctoolbox for anything, and it works, go to the results window and see the process and export it to a python snippet. You will soon see how to translate "I know how to do it in ArcToolbox" to creating your own script. Good luck
The best thing about python is the command line. Often times I get stuck on a piece of code that doesn't work, so I load a variable in the command line, and try my code out on that variable to see the results then fix it in my script. Very handy.