Questions tagged [arcpy]

A site-package created by Esri to expose ArcGIS Desktop (ArcMap and ArcGIS Pro) geoprocessing, mapping, etc, to Python.

719 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
34 views

Adding multiple feature classes (gdb) to map file (aprx) by using addDatafromPath in ArcPy?

I have some problems adding multiple feature classes (not only a single one) from a geodatabase to a map file in an ArcGIS Pro project and I'm wondering if someone knows of a solution to this. To be ...
0
votes
1answer
125 views

Calculating volume between polygon and raster?

I want to calculate the volume between a route alignment and a raster. I have the centerline of the route. The centerline is between point A and B as it is presented in the figure below. Point A and B ...
0
votes
1answer
1k views

TypeError: unsupported operand type(s) for *: 'numpy.ndarray' and 'numpy.ndarray'

I am trying to insert a value for different group of percentile eg (0- 10 percentitle) value = 1. I saw an example over here and went to try it out How do I Calculate Grouped Percentiles or Batch ...
-1
votes
0answers
31 views

Selecting Table Records (with subtypes) by Attribute using Python AddIn?

ESRI ArcGIS Desktop version 10.4.1, a file Geodatabase having Line feature Class "Trench" with two tables "T_DUCT" and "T_SUB_DUCT". Existing "python.esriaddin", creates subtype records of "Trench" ...
-1
votes
0answers
28 views

Using Python Addin to apply Style to Legend?

I created an arcpy script to apply a style to my legend from my style template and it works when using the module within arcmap. But i want to add it as an addin button. import arcpy import Python ...
-1
votes
2answers
27 views

Attempting to use cursor to filter results by date, then use groups of records to find max value

In my data, I have a table view where I am trying to group same records (PID), then filter records by date (ROW_CREATE_DATE). if the record has the date of 2019-03-05 then find records in the line # ...
-1
votes
1answer
59 views

Making looping through line segments for vertex points faster?

I am trying to speed up some current code that I have for looping through lines, getting their segments and ultimately the vertex points in Python. Can anyone recommend a faster method than what I ...
-1
votes
2answers
21 views

Trying to make a toolbox from script buffer to erase to make feature layer

I am trying to take a script that I edited from a ModelBuilder export. I am trying to plug it back in to make a tool that will buffer then erase, and then make feature layers. What am I doing wrong? ...
-1
votes
2answers
89 views

How to iterate through date and time text file, line by line?

I am building a model on ArcGIS and I am now trying to iterate through a text file that contains in each line date and time information. I tried to do that on Model Builder, only I used the get field ...
-1
votes
1answer
35 views

Adding rasters from folder if it in the data frame extent of the map using ArcPy?

I have 55 rasters located in "G:\desktop\Project\lyr\50k", and i try to add them to MXD file - only if the rasters extent are in the dataframe extent of the MXD file, using python code (in ArcGIS 10.3)...
-1
votes
1answer
384 views

Join Field Management

I have not used the following tool, and am recieving the following error when trying to add a field to two of the following FC's below. Is this a syntax issue? import arcpy PlaceFC= filepath ...
-1
votes
1answer
194 views

Counting non-null attributes using ArcGIS Field Calculator?

I have an ESRI featureclass with a lot of records that have been scored to certain criteria, although criteria have been left null for records where they aren't deemed relevant. I'm now trying to ...
-1
votes
1answer
302 views

Updating Page Definition Queries with Python and data driven pages?

I have several annotation features that each have a tileID field. I would like to be able to enable the page definition query and select the correct Page Name Field to match the tileID field in all of ...
-1
votes
1answer
138 views

Publishing MXD through ArcPy, Without Opening ArcMap

I currently have to have ArcMap open and the connection to my ArcGIS server established in catalog to run my script which publishes MXD files. con = r'C:\...\myserver.ags' arcpy.mapping....
-1
votes
1answer
58 views

Fuzzy membership output different in arcpy and desktop

I am running a fuzzy membership on multiple rasters with the following code: arcpy.env.workspace=r'F:\Sheyenne\Normalized_Indices\NDII' NDIIout='F:\Sheyenne\Normalized_Indices\Fuzzy_Membership\NDII\\'...
-1
votes
1answer
702 views

using arcpy.UploadServiceDefinition_server to publish to portal

I'm using arcpy.UploadServiceDefinition_server() to publish SD files to a server that is federated with portal. Using this ESRI Documentaion I am able to publish the service to a specific folder on ...
-1
votes
1answer
119 views

Where Clause looking at two Columns and a RANGE Expression

Using ArcPy I'm Trying to Set up a Where Clause with a RANGE in my "FeatureClassToFeatureClass_conversion" This {Where Clause} needs to Query Two Columns in the data: FEATURE = 'ENVIRONMENT' and ...
-1
votes
1answer
96 views

Count and sum unique values with domain coded value

I have written a code for count and sum unique values. I am getting the unique values count on Field "SubtypeCD" by using following code only if I am using "row[0]" instead of "desc_Domain[row[0]]]"....
-2
votes
1answer
36 views

Editing feature class without creating separate output?

I have a feature class in my geodatabase and I would like to convert multi-parts to single-parts using the following syntax: MultipartToSinglepart_management (in_features, out_feature_class) Is ...