kev83

AliasNames as input for TIN in_feature_class

Discussion created by kev83 on Oct 21, 2013
I am trying to create a TIN from a cross section layer and then turn that TIN into a raster. The catch is, the TIN tool uses the alias name not the field name (I wish I knew why), and the data has different alias names for the same fields. Does anyone know if you can use the field.aliasName as an input for the TIN tool (or for that matter as an output for the raster tool)?

The script seems to work if I hard code the paths, however I get a syntax error by using the field.aliasName. I tried making field.aliasName a variable and substituting that way, however no luck.

Any help would be greatly appreciated!


# Set Enviromnent Settings
from arcpy import env
env.overwriteOutput = True

# Check out any necessary licenses
arcpy.CheckOutExtension("3D")

# Argument 1 is the XSCutlines Feature Class
Input_Feature_Class = arcpy.GetParameterAsText(0)
# Argument 2 is the Directory Rasters will be stored in
Output_Raster = arcpy.GetParameterAsText(1)



fieldList = arcpy.ListFields(Input_Feature_Class,"P00*","Double")
for field in fieldList:
    print "Field Name: " + field.name
    print "Alias: " + field.aliasName
    if "FEMA" in field.aliasName:
        #Process: Create TIN
        print "Creating " + field.aliasName + " TIN"
        arcpy.CreateTin_3d(Output_TIN, "", Input_Feature_Class field.aliasName hardline <NONE>, "True")
    print arcpy.GetMessages()

    # Process: TIN to Raster
    print "Converting TIN to RASTER"
    arcpy.TinRaster_3d(Output_TIN, Output_Raster + "\\" + fieldaliasName, "FLOAT", "LINEAR", "CELLSIZE 3", "1")
    print arcpy.GetMessages()
print "Complete"

Outcomes