Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 1419

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

6 votes
Accepted

Delete ALL ArcCatalog Database Connections using ArcPy?

There is no arcpy function to delete all database connections. A database connection is simply a file on disk. … If you want to remove these files you'll need to identify that directory in your profile and write your own code that has nothing to do with arcpy. …
KHibma's user avatar
  • 17k
10 votes

Can you use arcpy.da.SearchCursor() to go through multiple feature classes or shapefiles?

No. The cursor only accepts 1 feature class. Using your example, just wrap the cursor in the loop and pass in the feature class one at a time. for fc in featureclassList: with arcpy.SearchCursor(f …
KHibma's user avatar
  • 17k
3 votes
Accepted

mxd.saveACopy not creating a second copy

The error is correctly stating that the MXD doesn't exist. You create the mxd on line 8. On line 48 you saveacopy and then on line 50 you del mxd. You then go through another merge process and on li …
KHibma's user avatar
  • 17k
10 votes
Accepted

Checking if service pack is installed using ArcPy?

Try arcpy.GetInstallInfo() You'll get a dictionary of keys and should be able to write some logic on that {'SourceDir': u'C:\Users\kevi5105\Documents\ArcGIS 10.3\Desktop\SetupFiles\', 'Instal …
KHibma's user avatar
  • 17k
1 vote

Arcpy UploadServiceDefinition ignores folders and groups

The UploadServiceDefinition tool was originally created to publish services to ArcGIS Server. The ArcGIS/Esri stack has evolved that publishing is now done to a portal (portal and ArcGIS Online are es …
KHibma's user avatar
  • 17k
1 vote

I'm confused, where's the string in my Python code when I calculate this field in ArcGIS Pro?

As your SumPop variable =0, we know with certainty this is an int. Your pop variable is whatever your !Population! field is. Based on the error, this field appears to be a str You'll need to verify in …
KHibma's user avatar
  • 17k
5 votes
Accepted

How to create Shapefile on ArcGIS Server side?

I assume you're talking about geoprocessing services because you're using tools? By default Server will write output to the local jobs directory for a particular service / execution. This directory is …
KHibma's user avatar
  • 17k
4 votes

Reducing number of decimal places after X/Y coordinates in a FC

After you run ADD XY, run Calculate Field on each X/Y field. You just need the following in the expression (set the the expression type to PYTHON) round(!POINT_Y!, 2) and round(!POINT_X!, 2) Whe …
KHibma's user avatar
  • 17k
5 votes
Accepted

Count rows of attribute table of a shapefile in ArcGIS with Python

It looks more like you're trying to use syntax from another software package, database or maybe even SQL with arcpy -- you can't simply interchange it like that. …
KHibma's user avatar
  • 17k
1 vote

Not able to check the correctness of the SDE connection file

Maybe I dont understand the question, requirements fully - but if you have a "bad" connection file and you want to make sure its "bad", you can simply try listing the featureclasses or do some action …
KHibma's user avatar
  • 17k
1 vote

List with Strings as Filter for arcpy.mapping.ListLayers(mxd, "", df)

You could use some loops to clear the list. This is far from elegant, but it should be easy to follow the flow. # You already have you list of expected good names tmplist >>> ['Januar', 'Februar', 'M …
KHibma's user avatar
  • 17k
10 votes
Accepted

Removing multiple fields in Arcpy with remove function

What arcpy.ListFields returns is a python list. When you say list.remove(), you're asking for an item to be removed from the Python list. So for starters, if you want to delete a field from the FC, th …
KHibma's user avatar
  • 17k
6 votes
Accepted

Is there a way to programmatically access an ArcGIS Pro project's default geodatabase?

Yes. Use the defaultGeodatabase off the project: p = arcpy.mp.ArcGISProject("C:\\PRJS\\project1.aprx") p.defaultGeodatabase 'C:\\PRJS\\project1.gdb' Alternatively you can make use of "CURRENT" as i …
KHibma's user avatar
  • 17k
2 votes
Accepted

Python brkLyr.supports ("dataSource") Error?

TableView (assuming what was found in the MXD was a table) points to a table. And a tableview doesn't have the same methods as a layer. Per the doc, TableView doesn't have a "supports" method. It loo …
KHibma's user avatar
  • 17k
6 votes
Accepted

Use Python to import MXDs into an ArcGIS Pro Project and add the MXD file name to the import...

The short answer is: "you can't reliably do this with the functions that are available." The longer answer is: "you can do this if you allow your code to make some assumptions". The ArcGISProject cl …
KHibma's user avatar
  • 17k

1
2 3 4 5
13
15 30 50 per page