In ArcMap I can set a Geoprocessing option to add geoprocessing output to my table of contents (Geoprocessing > Geoprocessing Options...)
If this option is enabled my script output will be added to the table-of-contents, but if it's not enabled it isn't added. This happens even if I have output parameters set in my tool and
arcpy.SetParameter() in my script.
Is there a way I can force an output to be added to my ToC when a tool is run? The output is a temporary table (
in_memory) that users need to be able to access once the tool is run in the current ArcMap session.
import arcpy testabc = r"in_memory\testabc" myTable = "mytable" in_memory = "in_memory" output = arcpy.TableToTable_conversion(myTable, in_memory, "testabc", "", "", "") arcpy.SetParameter(0, output)