I'm having a frustrating time trying to use the Create TIN tool within Python, when the input featureclass name is a variable.
The help file entry for Create TIN shows a hard-coded path to the featureclass "points.shp" in the stand-alone example:
arcpy.CreateTin_3d("NewTIN", "....prj", "points.shp Shape.Z masspoints")
The script example uses {0}:
arcpy.ddd.CreateTin(outTin, sr, "{0} Shape.Z masspoints" .format(lasMP), "Delaunay")
It's unclear to me what the {0} represents (the first argument? - what if I don't have an argument, but only have access to a variable?).
The syntax section of the help file shows that the in_features can be specified as an array (of arrays?):
[[in_feature_class, height_field, SF_type, tag_value],...]
but I can't get this to work - it returns a generic "ERROR 999999: Error executing function".
So my question is, how can I use a variable as the featureclass name in the CreateTIN tool within Python?
Here is my non-functioning code:
fc = "path_to_featureClass"
tin = "path_to_output_TIN"
sr = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
arcpy.CreateTin_3d(tin, sr, [fc + "fieldName Hard_Line <None>"], "DELAUNAY")
(where I have valid paths to fc and tin, and fieldName is a valid field on the layer.) I can successfully create a TIN using this dataset when using the tool manually.