AnsweredAssumed Answered

How do you write a function that includes code completion like arcpy functions?

Question asked by kpierce8 on Dec 12, 2012
Latest reply on Dec 12, 2012 by csny490
I have a few functions for sets of tasks I do routinely. I'd like to have the dropdown of all feature classes in my document pop-up in the python command-line window like when I use a built in arcpy function. Is there a way to set up the parameters to do that? Here's a sample function.

def classClip(myInput, myClip, outFeature, outTable):     arcpy.Clip_analysis(myInput, myClip, outFeature)     arcpy.AddField_management(outFeature, "ClipAcres", "Double", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")     arcpy.CalculateField_management(outFeature, "ClipAcres", "float(!SHAPE.AREA@ACRES!)", "PYTHON")     arcpy.Statistics_analysis(outFeature, outTable, [["ClipAcres", "SUM"]], "AAClass")

Outcomes