AnsweredAssumed Answered

Create Vector Tile Package min and max scales not honored with arcpy script

Question asked by trace.stanford9 on Aug 26, 2019
Latest reply on Dec 13, 2019 by PacifiCorp_GIS

I have a python script that I want to use to automate the creation of a VTPK. My issue is that the script does not actually use the min and max scales that I enter, but is only caching levels 0 - 19. If I run the tool within Pro, it will cache the correct levels, but running outside will only cache levels 0-19 no matter what I put in for the min/max scales. I've seen another discussion close to this here, but it seems unnecessarily complex for what I'm trying to accomplish. Has anyone else encountered this issue and found a solution? Here is just a basic version of the code I'm trying to get to work, using an existing tiling scheme


import arcpy

arcpy.env.workspace = <workspace path>
arcpy.env.overwriteOutput = True

aprx =<path to project>)
m = aprx.listMaps()[0]
vtpk = <path of vtpk>
tiling_scheme = <path to tiling scheme>\VTTS_3567_NAD_1983_StatePlane_Utah_South_FIPS_4303_Feet.xml"
min_scale = 537922.337401
max_scale = 65.664348, vtpk, "EXISTING", tiling_scheme, "INDEXED", min_scale, max_scale, None, '', '')