Hello, I am wondering if this is a bug or my understanding of how this tool works is incorrect. I am running the code below in the python window of ArcGIS Pro 3.1.0
gdbBuilding = r"C:\data\city.sde\buildings"
buildingLayer = "buildingLyr"
erase_features = r"C:\data\city.sde\feature_buffer200ft"
temp = arcpy.env.scratchGDB + "\\temp"
arcpy.management.MakeFeatureLayer(gdbBuilding, buildingLayer, "VERIFIED = 1", "")
arcpy.analysis.Erase(buildingLayer, erase_features, temp)
I receive the following error:
arcgisscripting.ExecuteError: ERROR 160333: The table was not found.
Failed to execute (Erase).
If I type in the code to run the erase tool, when I get to the part for the first input, the intellisense/autocomplete presents an option for the name of the new Layer that was created. If I select it and use the other parameters the same as before, it runs without issue.
If I provide a string with the same value as the feature layer name variable, it works to my surprise. Variables that point directly to a feature class also work fine.
I tested with the Buffer tool and it worked when using the feature layer name variable as an input.
Cany anyone reproduce this behavior? Should what I'm trying work?