Bug
| Bug ID Number | BUG-000135234 |
|---|---|
| Submitted | November 6, 2020 |
| Last Modified | October 7, 2024 |
| Applies to | ArcGIS Pro |
| Version found | 2.6.1 |
| Operating System | Windows OS |
| Operating System Version | 10.0 64 Bit |
| Status | Non-Reproducible |
Options:
Example for option 1:
import arcpy
arcpy.management.MakeFeatureLayer(r"C:\Users\Desktop\Shapefile\Arcpy\esri\Testing.gdb\Polygons","Testl")
arcpy.management.SelectLayerByAttribute("Testl", "SUBSET_SELECTION", "LANDAREACODE = '021'", None)
print(arcpy.management.GetCount("Testl"))
Example for option 2:
import arcpy
import os
aprx = arcpy.mp.ArcGISProject(r"C:\ArcPy\ArcPy.aprx")
maps = aprx.listMaps()[0]
Polygon = maps.listLayers()[0]
print(Polygon)
arcpy.management.SelectLayerByAttribute(Polygon, "SUBSET_SELECTION", "LANDAREACODE = '021'", None)
print(arcpy.management.GetCount(Polygon))
Example for option 3:
import arcpy
arcpy.env.workspace = r"C:\Users\Desktop\Shapefile\Arcpy\esri\Testing.gdb"
a=arcpy.management.SelectLayerByAttribute("Polygons", "SUBSET_SELECTION", "LANDAREACODE = '021'", None)
print(arcpy.management.GetCount(a))
Bug ID: BUG-000135234
Software:
Get help from ArcGIS experts
Download the Esri Support App