Friday 15 December 2017

arcpy - Is there String Size Restriction in ArcGIS Python Script Tool parameter?


I'm trying to post a list of unique ID's (as a string) to a Python script tool for processing by ArcGIS Desktop 10.0.


The list may be 50k+ id's long (~450kb).


e.g. "237434,237435,237436,237423,237424,237425,237426"


When defining the input param for my tool, I have tried using the String, and 'Any Value' data types (different version, but described here).


The problem is: the parameter string is being truncated at 4285 Id's. I have been unable to find any info on the size restrictions of Strings passed in as tool params?


The number of Id's will be increasing over time, so I need to find a more robust way of dealing with large strings being passed in.



The obvious choice is to slice the string into digestable chunks - however, the way that multi value params are defined it appears that they must be preconfigured (I must know, or have a fixed number of chunks).


I want a dynamic solution; any suggestions?




I am able to get the Id's if I read them from a static text file, but the Id list will be a dynamic list being sent from client application for processing.


So basically I need to find a window in the tool params to get the list in.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...