This content has been marked as final. Show 5 replies
You can try gp.AddOUtputsToMap=True. That works with a arcgisscripting gp object, but not with arcpy. But with arcpy, you can simply write the code to add layers with arcpy.mapping.
Also, there is a switch in the geoprocessing options to automatically add gp results to the display.
Thanks for the input. I'm not able to try it right now, however as soon as I'm able to give it a shot, I will.
have you tried the AddLayer function of arcpy.mapping? If so, does it work in your code? Because i tried to and i am getting errors.
With the Python Scirpt i create a FeatureClass in a FileGeodatabase and would like to add the created FeatureClass into my map.
You have to create an layer object before you can add it to the map with addLayer. yourLayer=arcpy.Layer('path')
Thanks for the hint! That solved the problem.