I'm trying to add a temporary field to one of the input feature classes in my Python toolbox.
arcpy.AddWarning("Adding field of type " + fieldType.upper() + " to FC " + varFC + " called " + tempField) arcpy.AddField(varFC, tempField, fieldType.upper()) The first line outputs as I'd expect ("Adding field of type DOUBLE to FC C:\foobar\Test.gdb\inputFC called Population_temp"), but the second line raises an error:
أكثر...
arcpy.AddWarning("Adding field of type " + fieldType.upper() + " to FC " + varFC + " called " + tempField) arcpy.AddField(varFC, tempField, fieldType.upper()) The first line outputs as I'd expect ("Adding field of type DOUBLE to FC C:\foobar\Test.gdb\inputFC called Population_temp"), but the second line raises an error:
Failed to execute. Parameters are not valid. ERROR 000732: Input Table: Dataset C:\foobar\TEST.gdb\outputFC does not exist or is not supported Failed to execute (AddField).
"outputFC" is the output parameter in the Python toolbox, and NOT what's stored in varFC (which is an input parameter). I can't figure out why Arc is referencing outputFC at all, unless Python toolboxes will only allow alteration of parameters designated as output?
أكثر...