Select to view content in your preferred language

Instantiate TIN as Layer object - arcpy

03-16-2017 08:42 AM
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
Frequent Contributor
0 Kudos