Using arcgis 10.3, I trying to write code that when i do selection on layer manualy on MXD (not in the script) and run the script, the script need to run just on the selected features. I have tried -
layer = "Source Layer Path"
desc = arcpy.Describe(layer)
selected = desc.name
print (selected)
but it returns an empty list, is there a way to this in python?
I have tried this :
dataFrame = arcpy.mapping.ListDataFrames(Mxd)[0]
Layers=arcpy.mapping.ListLayers(Mxd, "", dataFrame)[0]
desc = arcpy.Describe(Layers)
selected = desc.Fidset
print ("selected = "+ str(selected))
Still same result