The code executes properly. I don't get any errors. But when I go to the workspace that I set, there is nothing there when there should be a TIN. Any idea what's wrong?
# Import system modules import arcpy # Set the parameters InputFeatureClass = arcpy.GetParameterAsText(0) field_1pct = arcpy.GetParameterAsText(1) field_0_2pct = arcpy.GetParameterAsText(2) spatial_ref = arcpy.GetParameterAsText(3) arg_1pct = InputFeatureClass + " " + field_1pct + " " + "softline" try: arcpy.env.workspace = arcpy.GetParameterAsText(4) arcpy.ddd.CreateTin("tin_1pct", spatial_ref, arg_1pct) except arcpy.ExecuteError: print(arcpy.GetMessages()) except Exception as err: print(err)
What are your input parameter values? Also you could try providing a full path to the output TIN instead of using the workspace environment setting to set folder location. Which I assume already exists?
Hi, @DuncanHornby , Thanks for responding.
I set the full output path as suggested. I enter it as a string for the first argument of the CreateTin method, corrrect? If so, that did not work.
I've attached a screenshot of my input parameters.
OK this may be more about you not reading the help file on the tool...
As you have set the input to be softline this according to the usage section of the tools help file means your input shapefile is a polyline dataset and according to the help file that's a break line. If your data are contour lines may be try setting it to Mass Points? Or if they are truly break lines you need to be providing the elevation data as well.
Also when asking such questions you really need to be including images of you data, the parameters and what the parameters were set to, as basically I or anyone else are second guessing as you have not provided enough information. You can always go back an edit your original question to improve rather than adding another comment, means others can benefit from your Q&A.