Iterate Create TIN in over multiple folders

741
1
10-17-2018 09:17 AM
TrevorMiddel
New Contributor

I'm a long time ArcGIS user and occasional (very) Model Builder user. I've only reached to Model Builder when I need to iterate tasks over multiple datasets and usually after a bit of stumbling I manage to get something working. In this case I'm stumped though and I think I'm missing something fundamental. 

I have about 150 folders each containing identically named point and polygon shapefiles with identical field names respectively. I need to use these to construct individual TINs and rasters which will each be stored in their respective subfolders. The polygon should be treated as a Hard_Clip and the points as Mass_Points.

As shown in the attached screenshot I'm using Workspace Iterator to select the point and polygon shapefile within each folder then using these as inputs to the Create TIN tool. I cannot seem to wrap my head around how to get the Create TIN tool to use these as inputs where the field names defining heights are recognized. Do I need to set up the Create TIN tool as a submodel, passing the workspace (folder) name to it? 

Many thanks for any assistance. I need to take a model builder course obviously. 

Trevor

Edit - I've added the full model working model I would like to run within each folder, this model works fine within a folder right now. I just can't figure out how to iterate it. 

0 Kudos
1 Reply
curtvprice
MVP Esteemed Contributor

On thing I recommend right away is make Lake a precondition to Create TIN to insure the correct pathname string is used during iteration. Also in the second model make sure Path is a precondition to Create TIN for the same reason.

As for your problem of packing model variables into a value table for the Create TIN tool, this is a real limitation of doing things in Model Builder, as you can't pack variables like %FIELDNAME% inside a value table parameter like most garden-variety tool parameters. The only workaround I know for this is to do embed arcpy.CreateTin_3D within a Python function that creates the value table and runs Create Tin inside the Calculate Value tool, or write a little Python script tool and use the tool in your model. (I hope this makes sense to you.)

0 Kudos