AnsweredAssumed Answered

ArcPy help

Question asked by jsingh_tscggis on Jul 12, 2018
Latest reply on Jul 16, 2018 by MMorang-esristaff

Hello I seem to be running into an issue where when i run this code in an IDE such as pycharm the code run successfully however it doesnt seem to create any service area or polygons. I do have all the necessary licenses and I am using the correct interpreter. *This code does work in the python window in ArcPro.

 

Any solutions?? Thanks

 

import arcpy

print ("Enter Workspace path :")
workspace=input()
arcpy.env.workspace = workspace 

print("running")

 

arcpy.na.MakeServiceAreaAnalysisLayer("https://www.arcgis.com/", "Service Area", "Driving Time", "FROM_FACILITIES", "5;10;15", None, "LOCAL_TIME_AT_LOCATIONS", "POLYGONS", "STANDARD", "OVERLAP", "RINGS", "100 Meters", None, None)

 

arcpy.na.AddLocations("Service Area", "Facilities", "Site", "Name Location #;CurbApproach # 0;Attr_Minutes # 0;Attr_TravelTime # 0;Attr_Miles # 0;Attr_Kilometers # 0;Attr_TimeAt1KPH # 0;Attr_WalkTime # 0;Attr_TruckMinutes # 0;Attr_TruckTravelTime # 0;Breaks_Minutes # #;Breaks_TravelTime # #;Breaks_Miles # #;Breaks_Kilometers # #;Breaks_TimeAt1KPH # #;Breaks_WalkTime # #;Breaks_TruckMinutes # #;Breaks_TruckTravelTime # #", "5000 Meters", None, None, "MATCH_TO_CLOSEST", "APPEND", "NO_SNAP", "5 Meters", "EXCLUDE", None)

arcpy.na.Solve("Service Area", "SKIP", "TERMINATE", None, None)

print("DT Ended")

Outcomes