Instantiate TIN as Layer object - arcpy

869
1
03-16-2017 08:42 AM
martinaraffellini
New Contributor II

Hello! the following commands works with shapefiles and rasters, but i cannot manage with a TIN.

Do you know the reason?

tin = C:\PROJECT\mytin

arcpy.CreateTin_3d(tin, CoordSys, Input_Features)  # coord sys and input defined above

mylayer = arcpy.mapping.Layer('{0}'.format(tin))

I get an error: invalid data source.

So i tried to save the TIN as a .lyr files first with arcpy.SaveToLayerFile_management(tin), but i get the same error.

With rasters and shapefiles i just give in input the full path of the file, but about the tin?

Thank you!

Tags (1)
0 Kudos
1 Reply
IanMurray
Frequent Contributor
0 Kudos