Why my python script doesnt create .sbn .sbx files

326
2
08-26-2021 10:51 AM
GISUserVa
New Contributor II

Why does my script not create a .sbn and .sbx file?  What do I need to change to make it create them?

thanks

 

import arcgis
import arcpy
from arcpy import env
arcpy.env.overwriteOutput = True
from arcgis.gis import GIS

###Variables
AGOL_Login = GIS("url", "username", "password", verify_cert=False)
itemToDownload = AGOL_Login.content.get("b6451dd141bbbd89a0e0fc")
exportLoc = r"C:\Users\youknowit\Desktop\PROJECTS\Downloads"
itemExportName_SHP = "test"


itemToDownload.export(itemExportName_SHP, "Shapefile", None, True)

searchForExportedItem = AGOL_Login.content.search(itemExportName_SHP)
exportedItemID = searchForExportedItem[0].id
getTheExportedItems = AGOL_Login.content.get(exportedItemID)

getTheExportedItems.download(exportLoc)

 

Tags (1)
0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

Did you create any spatial indices?

Shapefile file extensions—ArcMap | Documentation (arcgis.com)


... sort of retired...
0 Kudos
Luke_Pinner
MVP Regular Contributor
0 Kudos