The examples below are based on this folder structure: Example project folder Relative paths and folders The following technique of finding data relative to the location of the script is a common pattern. For r
msgs ="ArcPy ERRORS:\n"+ arcpy.GetMessages(2) +"\n"# Return Python error messages for use in script tool or Python windowarcpy.AddError(pymsg) arcpy.AddError(msgs)# Print Python error messages for use in Python / Python windowprint(pymsg) print(msgs) 如果使用了上述代码并且地理处理工具...
解析程序: Python 表达式: time.strftime("%d/%m/%Y") 计算当前日期和时间。 解析程序: Python 表达式: datetime.datetime.now() 计算的日期为 2000 年 12 月 31 日。 解析程序: Python 表达式: datetime.datetime(2000, 12, 31) 计算当前日期和字段中的值之间的天数。 解析程序: Python 表达式: (date...
\conflationTools\ScriptExamples\data.gdb"try:# Set local variablessourceFeatures="updateRoads"targetFeatures="baseRoads"transfer_fields="RD_NAME"search_distance="300 Feet"match_fields=""outMatchTable=""transfer_rules=["TRAVEL_DIRECTION One-Way","SPEED_LIMIT MAX"]# Make a copy of the target...
Run Python Script Snap Tracks Summarize Attributes Summarize Center And Dispersion Summarize Within Trace Proximity Events GeoAnalytics (Task Concepts) GeoAnalytics Tools in Run Python Script Reading and Writing Layers in pyspark Examples: Scripting custom analysis with the Run Python Script task GeoAnalytics...
If the script is not correctly updated onCityEnginestartup, delete thePythoncache directory$USER_DIR/.cityengine/$CEVERSION_DIR/pythonCache/. Change street widths Often you need to increment the street width attribute of many segments. When you cannot do this efficiently in the GUI, using aPytho...
run_python_script() for Enterprise 10.9 Adds parameters: param_as_input arcgis.features.managers Version differences() method adds moments parameter adds parameter table Adds restore() method AttachmentManager ParcelFabricManager Adds methods: analyze_least_squares_adjustment() apply_least_squares_adj...
In ArcGIS Pro, you can no longer create your own custom geoprocessing tool in .NET. However, you can create a tool using Python script and call it in .NET code. If you need to run a sequence of tools with inputs from the users between the calls, create a model with the sequence se...
You can copy a form between maps using ArcGIS API for Python and the copy_form_between_maps Python script or ArcGIS Online Assistant. For step-by-step instructions, see the Duplicate maps and forms for use in Field Maps blog post. Add basic form elements Basic form elements allow mobile wo...
Python API designed to work externally with ArcGIS REST Services to query and extract data, and view service properties. Uses arcpy for some functions if available, otherwise uses open source alternatives to interact with the ArcGIS REST API. Also inclu