I was able to put together a script that geocodes a given table of addresses and generates service areas for them, and I am currently in the process of converting it for use as a script tool. I am having trouble with the command arcpy.na.MakeServiceAreaAnalysisLayer and its cutoffs variable. I have set it up as a parameter in the script tool so that users can enter their own drive times, but no matter how I try to set it up, the output always defaults to the [5, 10, 15] drive times.
I know that when entering this at the command line, the desired cutoffs are to be separated by commas and enclosed by square brackets, as in my example above. Based on other scripts I've done in the past, I set it up as follows:
DriveTime = arcpy.GetParameterAsText(9)
DTString = """[{0}]""".format(DriveTime)
NAServArea = arcpy.na.MakeServiceAreaAnalysisLayer(AGOL, "Service Area", "Driving Time (Miles)", "FROM_FACILITIES", DTString, None, "LOCAL_TIME_AT_LOCATIONS", "POLYGONS", "STANDARD", "OVERLAP", "DISKS", "0.1 Miles")
So if I enter 30, 60 into the script tool, it should pass [30, 60] into the command to set up the service area layer. I am guessing it will come down to some kind of syntax quirk; hopefully it will be that simple. Any help is appreciated. Thanks!