AnsweredAssumed Answered

dynamic output features name

Question asked by tamerali on Mar 13, 2020
Latest reply on Apr 15, 2020 by curtvprice

Hello, I am trying to create a script that allows making a loop inside the data set, using each layer inside it to create a specific report, my question is how can I make the name of the output resulting layer as it matches the name of the input layer like %Name% in model builder. the following is the script.

import arcpy
... arcpy.env.workspace=r'E:\Drawing_id\drawing.gdb'
... listdataset=arcpy.ListDatasets("*","feature")
... listfeature=arcpy.ListFeatureClasses("*","",listdataset)
... for ds in listdataset:
... if ds =='potablwater':
... listfeature=arcpy.ListFeatureClasses("*","",ds)
... for fc in listfeature:
... listfield=arcpy.ListFields(fc)
... for fd in listfield:
... if 'DRAWINGID' in
... arcpy.Frequency_analysis(fc,r'C:\Users\aaaaa\Documents\ArcGIS\Default.gdb\??????','DRAWINGID')