Get feature class/raster name

462
1
Jump to solution
07-24-2012 02:40 PM
KatharinaPalffy-Gelfand
New Contributor
Hello,
what is the best way to get a feature class or raster name from a geoprocessing tool result?
For example: buffer a feature class, get the name of the buffered feature class and write it to a table.
The reason behind this, is to use that output feature class name in a new geoprocessing operation.
List Rasters and List Feature classes does not work in this case, since I am not interested in all of the Rasters/Fcs in a workspace.
Any help will be greatly appreciated.
Thanks,
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
SolomonPulapkura
Occasional Contributor III
Roughly (if using a script) -
b = arcpy.Buffer_analysis(input fc, output fc, buff_dist) name = arcpy.Describe(b).name


You can then use insert cursor or update cursor to write the name to a table.

View solution in original post

0 Kudos
1 Reply
SolomonPulapkura
Occasional Contributor III
Roughly (if using a script) -
b = arcpy.Buffer_analysis(input fc, output fc, buff_dist) name = arcpy.Describe(b).name


You can then use insert cursor or update cursor to write the name to a table.
0 Kudos