New answers tagged

1 vote

OS Error CURRENT using ArcPy in ArcGIS Pro

first change this line - the project file extension is .aprx aprx = arcpy.mp.ArcGISProject(r'C:\Path\To\Projectaprx\test.aprx') example:
Hildermes José Medeiros Filho's user avatar
7 votes
Accepted

Turning off layer visibility in ArcGIS Pro with Python

I expect that your for loop never runs, because there is no layout element that matches your "Layer" wildcard. You should be getting your layers from the map, not from the layout. Use m....
Son of a Beach's user avatar
0 votes

Converting multipart line Feature class into individual .kml files based on particular attribute table using ArcGIS Pro

If you're not wedded to using ArcPy, a very simple approach would be using ModelBuilder in ArcGIS Pro. The example below just uses county boundaries and iterates by state, but the approach would be ...
lambertj's user avatar
  • 2,962
2 votes

Moving points based on updated x,y values

I'll guess that: 1.you have a way to select the points where the new coords are needed. 2.you have two columns with coords. If thats the case do: filter the data get the coords, create Geometry make ...
Hildermes José Medeiros Filho's user avatar
0 votes
Accepted

Create a new GPFeatureLayer from data frame

I found this answer. It may not be the right way to do it, but it works for me. import arcpy from arcgis.gis import GIS from arcgis import features from arcgis.features import FeatureLayerCollection ...
WilliWespe's user avatar
3 votes
Accepted

How to increase line width?

Checkout the Esri docs for Python CIM here. I'm assuming it's ArcGIS Pro and version 3.0+ Here is an example. The definition described below is like JSON. I reccommmend setting symbology manually and ...
Clubdebambos's user avatar
  • 1,635
4 votes
Accepted

Using page query with python

Use Python CIM access as described below. A handy way to see what you want to update is to set it manually, then export the layer to lyrx and open the lyrx in a notepad to view the JSON. ## access ...
Clubdebambos's user avatar
  • 1,635
1 vote

Selecting records after using insert cursor

The InsertCursor - ArcGIS Pro | Documentation returns an object, specifically an integer representing the ObjectID of the record that was just inserted, so all you have to do is store those integers. ...
bixb0012's user avatar
  • 1,814
0 votes

Get raster value at specific point (arcpy)

To extract raster value by coordinates: https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/get-cell-value.htm
Stanislaw Bidowaniec's user avatar
3 votes
Accepted

Importing CSV file in ArcGIS Pro ArcPy script using relative paths

This: scriptsPath=os.path.dirname(os.path.realpath(__file__)) will give you path to toolbox (works with tbx), so join 'data' and scriptsPath to get location of csv file.
FelixIP's user avatar
  • 22.6k

Top 50 recent answers are included