Python Script Tools are added to standard toolboxes (*.tbx) of ArcGIS for Desktop
0
votes
0answers
22 views
Create table of type info or dbase has not nullable fields
[updated]
In a script tool i use the CreateTable_management function to calculate some values as a result of an intersection of two polygon layers. The script uses a Parameter to specify path und name ...
1
vote
1answer
26 views
Cancelling Python Script Tool?
I am trying to let a user cancel the ArcToolbox script tool that I am creating. When the code is running, if I press cancel, the process just continues. I have looked at ESRI help on the issue (http://...
0
votes
1answer
34 views
Temporal buffers to “highlight” points
I am trying to write a script that pans to every point of layer, creates a temporal buffer to "highlight" point and exports the image. I want buffer to be deleted after every loop run, so I can use ...
0
votes
0answers
32 views
Drop down box ArcGIS script tool [on hold]
I am currently creating a script tool. One of the fields gets populated with some values that could be used by the user if they want to. However, when I enter the value I want, not one that is in the ...
0
votes
1answer
89 views
Writing Python script tool for Data Driven Pages?
I'm very new to writing my own scripts.
What I am trying to accomplish is exporting JPEGs with a world file that follow data driven pages. I would like to automate this process as much as possible,...
2
votes
0answers
36 views
Field Mapping in Custom ArcMap Script
I'm writing a script which takes, for its first two parameters, feature classes (or tables). For the third parameter, I want to provide the user with a field mapping option similar to what ArcMap uses ...
5
votes
1answer
38 views
Python script into model
I have a toolbox to share with my collegaues, it includes a model and imported python script. This script is also imported to the model in the end of session.
When I share this toolbox to another PC, ...
0
votes
1answer
26 views
Adding Selected Features Checkbox to ArcGIS Tool
How do I add a checkbox that allows the user to only apply tool to selected features?
#CalculateMultipleFields.py
#Created By: Neal Banerjee
#Date: Novemeber 2013
#Purpose: Calculates multiple ...
1
vote
1answer
41 views
Using script tool input as variable in Python script tool?
I have made three different script tools to run in a module that is going to clean multiple sets of data as I get them.
import arcpy
fc = "C:\Users\CartoFront\Desktop\Chicago Update\Chicago Update....
1
vote
1answer
34 views
Matching to symbols in style using ArcPy?
I have made a style with all my values and colours for my floodmap. I can match them manually at the properties, but is there a way (maybe with Python) to do this automatically in ArcMap?
When they ...
-1
votes
1answer
34 views
Generate SORTID Field to preserve sort for Feature class and Shapefile?
We want a tool for ArcGIS Desktop that sorts a input (Shapefile/or Feature Class), and then generates a "SORTID" field and generates Sequential values that preserve the sort. The problem is that the ...
0
votes
0answers
15 views
Exporting map document with selected symbolized layer in ArcPy?
My goal is to write a python script that has an input .mxd that will be exported as a .pdf with a singular layer in it that is symbolized with graduated colors for a certain field.
What I'm having ...
0
votes
0answers
15 views
Script Generated Filter List Returns Unpredictable Results for Strings
I am writing a script to be used in ArcMap which takes three parameters- a feature layer, a field, and any number of values in the field. Using the feature layer it generates a pick list of field ...
2
votes
1answer
57 views
Choosing string from dropdown list rather than typing it into Python script tool?
As you can see, in the above picture, I need to input the county name to finish the parameter setup. Can I change the last part from inputting string to choosing an item from a dropdown list? For ...
1
vote
0answers
22 views
Arcpy self-made tool doesn't display the results in the table of contents [closed]
I wrote a code with the purpose of generating a gradient raster map, using points as entry values and then clipping it to the map extend that I want.
The code works fine when I use the python window ...
1
vote
1answer
16 views
Arcpy - AttributeError: PageLayoutObject: Error in executing ExportToPNG
I’m building a custom tool, where you input the city and state and the tool outputs an image file of a map with certain features buffered, labeled, etc. I’m running into problems on the last step, ...
1
vote
1answer
48 views
Tool script multi-value parameter, Input raster does not exist
How do I adjust my script to accept a raster with a filename like the example below when used as a tool in ArcGIS with MulitValue set to Yes?
"008. STUDY AREA MAP_rectified_NAD83_Z12.tif"
With ...
2
votes
0answers
75 views
Adding layer with ArcObjects from Python script tool?
I would like to load an AFR file into a data frame in a currently open MXD and the IMap.AddLayer function is not working as expected if the data frame in which to load the AFR file is activate.
And I ...
1
vote
1answer
35 views
What is the right SQL query for this case? [duplicate]
I want to use input string in part of the SQL query, and the code has been posted below.
import arcpy
import os
in_features = arcpy.GetParameterAsText(0)
target_county = arcpy.GetParameterAsText(1)
...
1
vote
1answer
69 views
How to load data in a record set from a table?
I'm developing a python tool in ArcGIS 10.3 .I want to show selected record that are result of the select by attribute.
Is it possible to show the selected records in the record set ?
import arcpy
...
4
votes
1answer
59 views
Creating selection record using ArcPy and Python script tool?
I want to create a tool that list records of a field in the selection part and move some of records to the right pane.
How can i create the UI using ArcGIS and a Python script tool in a standard ...
3
votes
1answer
75 views
PyQGIS custom script writes file as optional
I had this problem in my custom script in PyQGIS.
I create the variable as input in this way:
##lista_formaciones_forestales_con_estrategia = file
In theory this is the correct way to write a non-...
2
votes
1answer
28 views
Returning results from script tool in Geoprocessing Results window?
I have a script tool that prints a list of unique attributes in a feature class. It works fine in PythonWin. When I include it my model, it runs successfully, but does not display the attributes in ...
4
votes
1answer
73 views
arcpy.CalculateField_management doesn't recognize variable in code block
I found a useful field calculator code block that I'm trying to add to a custom python tool. It works great in the manual field calculator; however, when inserted into the code block text to be used ...
0
votes
2answers
109 views
ArcGIS crashing with Tkinter?
When I run certain scripts (contains tkinter or similar python packages) ArcGIS crashes. When I load or copy/paste the same code and run it in a Python window it runs without error.
Is there a ...
1
vote
1answer
68 views
Display a messageBox with an image in ArcMap
I wanted to add "ABOUT" button to a Pythonaddins toolbar
the button should display a window that contains both of a text defines the authors and an image about the developer organisation.
I followed ...
0
votes
1answer
48 views
Enabling Drag and Drop from TOC to Python Script Tool?
I am creating an ArcTool and wanting to have my input parameters encompass a drop down menu where files in the TOC can be chosen. The tool is shown below
I currently have a .csv and .shp sitting in ...
0
votes
0answers
15 views
Defining numerical parameters using pythonaddins? [duplicate]
I am developing a pythonaddins that read a number of raster layers (defined as list), but the number should be determined by the user. unfortunatly, I didn't find in the pythonaddins modules any way ...
1
vote
2answers
74 views
Converting Python script tools from arcgisscripting to ArcPy?
I have found some toolbox with python scripts from ArcGIS 9.3, and I am trying to edit that script to work in ArcGIS 10.3.
This is the picture of the tool dialog.
And this is the code for older ...
1
vote
0answers
42 views
Import pandas from ArcGIS Script Tool [closed]
I am developing a data import script tool for ArcGIS that downloads from an SQL Server into a pandas DataFrame. This python script worked perfectly as I built it in Spyder however now that I am ...
1
vote
1answer
96 views
If/then statement with layer definition query
I created a short script which creates a layer from a table view, applies a definition query (hereafter DQ) to that layer, then uses that layer to generate a report. The script works perfectly except ...
0
votes
2answers
32 views
Saving last selected value in Python Script Tool? [closed]
I have created a python script tool with python 2.6 and arcgis 10.0 in which the user parameter reads a field and provide list of field content , below is the list.
user selects the desired value ...
2
votes
1answer
49 views
Setting up Python script to read tool parameters from table?
In ArcMap 10.4.1 I made several models with the ModelBuilder and then I exported them to a Python script. I want to keep/define all parameters and settings of the tools centrally in a table and let ...
0
votes
1answer
34 views
Convert GPlinearunit to float in arcpy
Is it possible that arcpy converts all inputs of the a value registered as GPlinearunit (kilometers, meters, feet, miles, etc) into units of XY coordinates system?
I need to perform calculations with ...
1
vote
1answer
60 views
Setting Up Python Script tool ( ESRI arcpy ) to download files from table
It's been years since I have worked with ArcPy and I'm having trouble setting up the parameters in my script tool.
What I'm trying to do:
I have a layer file (.lyr) that is a state wide index grid ...
0
votes
1answer
26 views
Setting Python script tool parameter type so that parameter accepts feature class or layer as input?
I would like a few of my parameters in my script tool to be able to accept either a feature class or feature layer as input. However, I have not been able to figure out a proper parameter type to ...
0
votes
0answers
22 views
Cannot Edit Python Script from ArcMap/ArcCatalog with IDLE? [duplicate]
I'm trying to set my Script Tool Editor in the Geoprocessing Options dialog so that I can edit a script tool within ArcMap. Currently, whenever I right-click on my script and select "Edit..." from the ...
2
votes
1answer
38 views
ArcGis Script tool: paramater's Type based on another parameter's Value? [closed]
In my script tool case, I've used the validation tool to make parameter[4] enabled only if parameter[3] equal a certain value, but i need to make this parameter[4] required only if enabled. the ...
1
vote
0answers
23 views
Removing the first lines of an ascii file as a python script tool [closed]
I want to delete the header of an ASCII file with a python script in ArcGIS. The header is always six lines long.
After running the script that needs this ASCII file, I need to reinsert the header. ...
1
vote
1answer
26 views
updateCursor not updating rows correctly with conditional statement only with arcpy toolbox
I am attempting to create a script with arc toolbox in which part of the script populates a probability field based on thresholds on a percentage field. I would like the thresholds for the ranges ...
1
vote
1answer
84 views
Pass the onMouseDownMap X, Y from a python addin to a toolbox script tool
Is it possible to pass the onMouseDownMap X, Y coordinates to a script tool launched using GPToolDialog?
The end goal is to have the user select the add-in tool, click the map to add a point, then ...
0
votes
0answers
11 views
Suppressing ArcPy “This script has no parameters” message? [duplicate]
I'm currently working on a python script from a Toolbox that change the labels in a layer.
I was wondering if there is a way to suppress "This script has no parameters" message prior to execution. - ...
0
votes
1answer
89 views
Debugging AttributeError: Invalid destination path from ArcPy?
I'm doing some programming work for a client and we can't seem to get the script tool to work on her end. It works perfectly on my end but when she tries it, it grinds away for a long time and then ...
1
vote
2answers
170 views
ArcGIS 10.3.x - Publishing GP tools as GP services using Python 32- or 64-bit dependencies
Desktop environment:
Windows 10 64-bit,
ArcMap 10.3.1,
Python 2.7 32-bit (installed by ArcMap)
Server environment:
Windows Server 2012 64-bit,
ArcMap 10.3.1,
ArcGIS for Server 10.3.1,
Python 2.7 32-...
1
vote
2answers
76 views
Creating a drop-down list for arcpy script tool
I have written the following script but I cannot manage to create the drop-down list for the variable "select" (select=arcpy.GetParameterAsText(3)).
Any suggestions?
# Script arguments
inputRaster = ...
1
vote
1answer
98 views
Calculating polygon width ArcGIS 10.4
I am trying to calculate an average width of a large set of polygons.
I found the script below researching the topic.
The function is:
def add_average_width(featureClass, averageWidthField='Width'):
...
4
votes
1answer
83 views
Error when running Extract by Mask Script
I am using ArcGIS 10.3 Desktop to write a script tool to, among other things, extract raster data using a mask.
I keep getting these errors:
ExecuteError: ERROR 000875: Output raster: C:\...
0
votes
2answers
73 views
Choosing data type to use for input as feature class or shapefile in Python script tool using ArcPy?
I am writing a Python script tool within a toolbox with *.tbx extension.
I need to make the input parameter flexible (feature class or shape file) , so which data type I should select for this ...
0
votes
0answers
58 views
Setting Python Script Tool Parameter to Accept Either Input or Output?
I've created a script tool that has an optional output parameter of an Excel Workbook. If it's populated, the script will add a new worksheet. However, every time the tool is run, ArcGIS is somehow ...
0
votes
0answers
45 views
ArcGIS 10.3.x Python tool script - Automatically adding multivalue output feature class to display
I am developing a Python tool script in ArcGIS 10.3.x that is meant to be later published as a geoprocessing service. The tool script produces two output feature classes that I would like to ...