AnsweredAssumed Answered

Did MakeFeatureLayer_management change from 10.1 to 10.2?

Question asked by griner on Sep 30, 2015
Latest reply on Oct 14, 2015 by griner

I have Python code that creates a file geodatabase on the user's local data directory, creates some features in the .gdb (involves copying features, merging, intersecting, etc.) and results in a feature class in that local .gdb that I then want to add to the current map document, to show the results of all the Python/arcpy processing for the user that ran the tool.


The issue is that in 10.2 arcpy.MakeFeatureLayer_management does not add my final feature class to the current map document's TOC, So I use arcpy.mapping.Layer to make a layer of my final product and then use arcpy.mapping.AddLayer to add the layer to the current map document. Works great.


But then the tool gets run on a different user's machine that's running ArcMap 10.1 and MakeFeatureLayer_management barks with an error '000733' - output layer is same as input layer. So I remove the arcpy.mapping code and just let MakeFeatureLayer_management work with the single parameter and now my results get added to the current map's TOC!


(this is all 32-bit python/geoprocessing)


The on-line documentation for 10.1 and 10.2 for MakeFeatureLayer_management don't mention any difference in behavior concerning whether the dataset's layer gets added to the current map document.