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
<SPAN class="keyword token">import</SPAN> arcpy
arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>workspace <SPAN class="operator token">=</SPAN> <SPAN class="operator token"><</SPAN>workspace path<SPAN class="operator token">></SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>env<SPAN class="punctuation token">.</SPAN>overwriteOutput <SPAN class="operator token">=</SPAN> <SPAN class="token boolean">True</SPAN>
aprx <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>mp<SPAN class="punctuation token">.</SPAN>ArcGISProject<SPAN class="punctuation token">(</SPAN><SPAN class="operator token"><</SPAN>path to project<SPAN class="operator token">></SPAN><SPAN class="punctuation token">)</SPAN>
m <SPAN class="operator token">=</SPAN> aprx<SPAN class="punctuation token">.</SPAN>listMaps<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN>
vtpk <SPAN class="operator token">=</SPAN> <SPAN class="operator token"><</SPAN>path of vtpk<SPAN class="operator token">></SPAN>
tiling_scheme <SPAN class="operator token">=</SPAN> <SPAN class="operator token"><</SPAN>path to tiling scheme<SPAN class="operator token">></SPAN>\VTTS_3567_NAD_1983_StatePlane_Utah_South_FIPS_4303_Feet<SPAN class="punctuation token">.</SPAN>xml"
min_scale <SPAN class="operator token">=</SPAN> <SPAN class="number token">537922.337401</SPAN>
max_scale <SPAN class="operator token">=</SPAN> <SPAN class="number token">65.664348</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>management<SPAN class="punctuation token">.</SPAN>CreateVectorTilePackage<SPAN class="punctuation token">(</SPAN>m<SPAN class="punctuation token">,</SPAN> vtpk<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"EXISTING"</SPAN><SPAN class="punctuation token">,</SPAN> tiling_scheme<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"INDEXED"</SPAN><SPAN class="punctuation token">,</SPAN> min_scale<SPAN class="punctuation token">,</SPAN> max_scale<SPAN class="punctuation token">,</SPAN> None<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">''</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">''</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>