Python Script Tools are added to standard toolboxes (*.tbx) of ArcGIS for Desktop

learn more… | top users | synonyms

1
vote
1answer
33 views

How to access script (source) of custom tool stored in tbx?

I have few custom toolboxes, with script tools. I can access individual toolbar by: ToolBar=arcpy.ImportToolbox(toolbar_path) I can access each tool by iterating through ToolBar.__all__ I’d like ...
1
vote
0answers
26 views

Installing Python/site packages on LAN server

I'm going to be sharing an ArcGIS script tool with coworkers and I want to store all necessary mxds, gdbs, and script files in one folder on the server so the file paths are absolute. However, the ...
1
vote
2answers
46 views

ArcToolbox Date default to today

In ArcToolbox I have a script (arcpy) that calculates some info plus a date into a database table. The date required to write is often (but not always) the current date, so the tool asks for input of ...
0
votes
0answers
30 views

ArcGIS 10.2 Custom Tool Sort Drop-Down-List by another field of table

I'm making a Custom Tool in which the user could select one input-parameter from a field of a table as a Drop-Down-List. The issue is, that I don't want to sort the Drop-Down-List in alphabetical ...
2
votes
1answer
70 views

Making a tool from script, arcpy.Project_management () comes with an error

I have a script (just a fragment here, up until the line after which the error comes up): import arcpy from arcpy import env arcpy.env.workspace = arcpy.GetParameterAsText(0) ...
0
votes
1answer
42 views

arcpy custom script tool to find and replace floats and ints?

I created a custom script tool that can find and replace text. See the image link for what my tool interface looks like too, and I'll point out the find and replace fields are both set to string in ...
1
vote
1answer
19 views

Tool validation to filter out OID and geometry fields?

I have a python script tool (arcpy) in a standard toolbox that edits data in fields, but I want some code in tool validation that would make sure that when the user gets to the field parameter, the ...
1
vote
2answers
70 views

How to keep a parameter blank in a script tool?

I've developed a sort of find and replace script tool that functions. But I'm not able to figure out how to find empty cells in fields and replace them.For the "Find" parameter, I have tried ...
1
vote
0answers
39 views

Adding multiple fields to feature classes in enterprise geodatabase using ArcPy?

I am very, very new at python and am trying to put together a tool that can be run on an enterprise geodatabase that will add a series of fields to each feature class. So far I have only been able to ...
1
vote
1answer
43 views

Passing field name as parameter to script in ModelBuilder?

I am new to ModelBuilder. I am running a python script from ModelBuilder that requires as it's parameters a table view and specific field names from that tableview. Essentially the script is looking ...
2
votes
1answer
55 views

Filter the Feature Layer parameter in Python Script Tool

I have a Python script tool where I have a parameter of type Feature Layer because I want to have the already opened layers as a dropdown list. I was wondering if there is a way to filter this ...
1
vote
0answers
31 views

Exporting .jpg files from data driven pages in Arcmap (name file is a text) [closed]

I am trying to export my Data Driven Pages to JPEG files named wiht an index layer field. I have used the code posted in other answer and it seems to work fine when the page names are numbers. ...
0
votes
0answers
25 views

Retrieving raster classes as data type in Python Script tool?

I want to program a python script tool in ArcGIS where the user should be enabled to input a classified raster and, based on this raster, the classes should be selectable. EDIT: As is suggested in ...
2
votes
1answer
38 views

Can tools or addins created in ArcMap be published and used in ArcGis Online?

I'm attempting to build an interactive map that would be hosted in AGOL. It would be a network query, whereupon selecting a point feature from an "inlet" layer, the map would display the corresponding ...
1
vote
1answer
40 views

Date different in field calculator using python method

I would like to calculate date different between two fields of date format. The idea is to know if Field_1 is greater than Field_2. My calculate code is something like this: def date(f1,f2): if f1 ...
1
vote
1answer
28 views

Value Table in Python Script not displayed correctly?

I am trying to implement a Python Script tool where I need a table to input shapefiles and corresponding names for new created fields. I found out that there is the Value Table provided by ArcGIS, ...
3
votes
3answers
119 views

python script tool validation checkboxes to radio boxes?

I am trying to build a tool in arcmap, which uses radio buttons in its gui. Since I read, that radio buttons are not supported, I figured, it couldn't be too hard changing the behaviour of simple ...
0
votes
0answers
73 views

arcpy UpdateCursor throws exception on geoprocessing service?

I wrote Python code that changes the state of a feature by ID. I am not using a Python Toolbox (.pyt). I wrote a python script and added it into a standard toolbox (.tbx). Using ArcGIS Desktop ...
0
votes
1answer
28 views

Using Model to define a group/range of numbers then populate a new field with the new definition

In one single table I have a rank in one field, and let's say I have rank 1 through 3 in one field and I want to define that group of rankings of 1,2 and 3 as having a score of '10', then ranks 4 ...
2
votes
1answer
66 views

Calculating Setbacks of Parcel using ArcGIS for Desktop?

I am looking for any guidance on how to calculate setbacks for a few parcels. I am using ArcGIS 10.3 I have a shapefile of a few land parcel. They have columns of Side_Setback, Front_Setback, and ...
4
votes
2answers
121 views

Incorporating several Python script tools into one tool and have user input determine section of script run?

I have a series of script tools created and work well in ArcMap 10.2.2 just fine. These tools generate a series of buffer features from an input feature class. I have these as separate tools each ...
0
votes
0answers
37 views

What data type is excel in Arcgis Add Script wizard?

When creating tool from a python script in ArcGIS, data type has to be chosen in Add Script wizard and one of my parameters is Excel and another one specific sheet whereas there can be more sheets in ...
1
vote
1answer
30 views

Debugging error 000865 in Python script tool for use with raster elevations?

I'm trying to create a python script tool that will take in a DEM/raster as a parameter, pull out the maximum and minimum elevation values, and iterate through this range of values at a specified ...
1
vote
2answers
64 views

Unable to set ValueList for parameter in python tool in ArcGIS

I have a tool I am writing that takes in a multiple parameters. The last of these, Codenumber, I want to define to be 1,2,3 or 4. I am attempting to do this by use of a Value List. See below section ...
2
votes
2answers
183 views

Trace Geometric Network won't execute in custom script tool

I'm trying to make a Python script tool which uses the Trace Geometric Network tool (10.3). My script works in the Python window, but as a script-tool, it runs and NOTHING HAPPENS. Messages state: ...
2
votes
3answers
49 views

Stacking multiple selected points in ArcGIS

I would like to find a way to stack multiple selected points in ArcGIS, either using the field calculator or python script. For example, I want to snap all points representing houses on a street into ...
3
votes
4answers
371 views

Get Parameter as Text and select layer by attribute

I have written a python script tool wherein a user specifies a feature class (e.g., Landuse) containing different attributes (e.g., parcel size, landcover etc.), name of the attribute field from which ...
1
vote
2answers
38 views

Inputs for building composite address locator from address locators created in for loop of Python script tool?

I'm building a script tool that creates up to 3 address locators and then uses the output address locators as inputs to the final output composite address locator. The tool executed perfectly prior to ...
3
votes
2answers
165 views

Setting input parameter to be float for Python script tool?

I made a Python (2.7.8) script, where one of the parameters is height (float) and I wan to make tool in ArcGIS 10.3 now. However in data type list there is only double. If I input integer value into ...
0
votes
0answers
33 views

How to create a dropdown option when setting up python script into the arctoolbox

So I created a script that I will import to a arctoolbox. On the display name section, I have asked the user to choose a workspace, select the shapefile, field name, and an option to make a pdf, jpeg ...
3
votes
2answers
376 views

ArcGIS Python Script Tool Field Name Drop Down?

I have a python script that checks file path names for corresponding files in a drive location. All of the inputs were originally hard coded, and it works well enough: import arcpy import os ...
0
votes
1answer
56 views

Parsing error with in ArcPy code

I have the following code in Python for a tool I want to build. For some reason I viewshed don't exist in the folder I have chose (out). Also when I am trying to define the output workspace every time ...
0
votes
0answers
42 views

Creating multiple dropdown lists in Python script tool?

Can anyone tell me how to create drop down lists? I want 'Area Name Field' to be a list of fields from the shapefile selected in 'Area of Interest' and 'Name Value' to be a list of field values ...
0
votes
0answers
49 views

Modifying Cluster Analysis script in ArcGIS.com Incident Analysis template to add dissolve for other fields?

I have fiddled around with some of my data, especially a high-count (> 50,000) point data set of business locations. In small scale I have successfully used ESRI's Incident Analysis to cluster these ...
0
votes
0answers
70 views

Same script runs in python window fails in script tool

I have this snipplet, in which I'm triing to use. If I run it in the python window in ArcMap it runs correctly, but when I'm using it as a script tool, it fails without error message. This script ...
1
vote
1answer
71 views

Writing Python script tool to enable ModelBuilder to skip over rasters without data?

This modelbuilder works well until the raster to polygon step. At that step, rasters without features cause an error(error 010151). I would like to put in a step before raster to polygon that causes ...
1
vote
1answer
169 views

Arcpy - Out of memory [closed]

I'm new at making scripts and I´m having some issues in my first arcpy script. I've created a code that automates maps creation, and it's running ok but gradually increases the memory consumption ...
-2
votes
1answer
71 views

Running custom geoprocessing tools written for ArcGIS 10.x for Desktop in ArcGIS Pro?

I am developing geoprocessing tools for Arcgis Desktop 10.3. I also have ArcGIS Pro installed . Can I run geoprocessing tools (written for 10.x) in ArcGIS Pro? Is it theoretically possible? Can ...
0
votes
1answer
109 views

Adding Parameter Descriptions to Script Tool

I've made a simple tool that accepts three parameters: an input file (feature class), an output folder (folder), and an output name (string). These are all required input with no filters. The tool's ...
1
vote
2answers
71 views

Adding output parameter to Python script tool?

How do you add an output parameter in a python script in a toolbox?
4
votes
3answers
80 views

Trying to list datasources in mxds

I've written a tool that prompts the user for a directory path, and optionally a single mxd. It then crawls the directory for mxds (or just the single one) and writes some of the properties of the ...
1
vote
1answer
26 views

arcpy.mapping exportPDF with ONLY one buffer ring turned on for associated iterated feature

I am exporting X number of maps iterating through a point feature class. Each feature class has a buffer drawn around them. I know how to export a PDF for each feature class at a fixed scale (if I ...
2
votes
1answer
51 views

Generating SQL expression from multivalue pick list in ArcGIS tool

I have created a script tool that allows users to select a single value from a pick list, which gets inserted into a query expression. The pertinent part of my code is pretty simple: Input = ...
2
votes
2answers
106 views

Use Cursor to Calculate Field with Input Parameters

I have the following script that is used with a script tool to truncate each word in an input string and output the result to another field. There is an input parameter for the length of the ...
1
vote
1answer
201 views

Passing two variables into codeblock of Calculate Field tool of ArcGIS Desktop?

I have a script tool that truncates each word in field to 3 characters and outputs the result in a new field: "THIS IS AN EXAMPLE STRING" becomes "THI IS AN EXA STR" import arcpy ...
2
votes
2answers
145 views

ArcPy Get Value of Field for Selected Record

I am building a script to populate a field in one feature class based on a field in another feature class. First I have a leases layer which is all small polygons. Then I have an index grid layer ...
1
vote
1answer
89 views

Adding drop down option for layers in Python script tool?

I've code that will add fields to feature classes. I've parameterized the script so the user can navigate to the location of the feature classes to be edited. If the feature class is already open ...
3
votes
1answer
150 views

Downgrading WRF Hydro GIS Pre-Processing Tools 2.2 to work with ArcGIS Desktop 10.0?

I have just come across the WRF Hydro GIS Pre-Processing Tools for the first time. The version I am looking at is 2.2 and its documentation says: The processing workflow for creating WRF-Hydro ...
1
vote
2answers
78 views

How to add a tool as a layer in table of contents ArcGIS desktop 10.3

I have a custom script tool in my toolbox in arcgis. I want to add it as a layer in table of contents so when the map is shared people can have access to it easily. for example as shown in figure When ...
0
votes
1answer
159 views

Debugging RuntimeError: Object: Error in getting parameter as text from arcpy.GetParameterAsText()?

I am trying to get this tool I've been writing for the past month operational. I think it should all work, but I'm getting caught up on the parameters of the code. Here is the start of the code that ...