The help for the Vector Tile tools is wrong. This code from the help does not work. It keeps saying the value type for in_map is wrong.
Create Vector Tile Package—Data Management toolbox | ArcGIS for Desktop
p = arcpy.mp.ArcGISProject("c:\\temp\\myproject.aprx")
for m in p.listMaps():
print("Packaging" + m.name)
arcpy.CreateVectorTilePackage_management(m, m.name + '.vtpk', "INDEXED", 295828763.795777, 1128.497176)
It just has "Map" for the in_map when copied from the python snippet but that of course does not work in script. I have yet to find anything it likes. Any hints?
arcpy.management.CreateVectorTilePackage("Map", r"C:\Vector\Settings.vtpk", "ONLINE", None, "INDEXED", 295828763.795778, 564.248588, r"C:\Vector\SettingsIndex.shp", None, None)
The tool to create the vector index will also not accept in_map. Its help has a sample from some other tool??
Create Vector Tile Index—Data Management toolbox | ArcGIS for Desktop
The following Python window script demonstrates how to use the CreateVectorTileIndex tool in immediate mode.
import arcpy from arcpy
import env
env.workspace = "C:/data/cartography.gdb/transportation"
arcpy.CreateIndexTiles_cartography("CURRENT", "tiles", 10000)
Also when copying the snippet from Pro it has another parameter with the value ONLINE that does not exist in the help.
#arcpy.management.CreateVectorTileIndex("Map", r"C:\Vector\SettingsIndex.shp", "ONLINE", None, 10000)
Please let me know the correct params or point me to help files that are correct.
Thanks