New answers tagged arcpy
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:
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....
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 ...
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 ...
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
...
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 ...
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 ...
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.
...
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
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.
Top 50 recent answers are included
Related Tags
arcpy × 10536arcgis-desktop × 1452
arcmap × 1150
python × 1026
cursor × 997
arcgis-pro × 949
arcgis-10.1 × 754
arcgis-10.2 × 711
arcgis-10.0 × 645
arcgis-10.3 × 427
python-script-tool × 419
raster × 392
spatial-analyst × 358
modelbuilder × 312
layers × 310
field-calculator × 298
python-toolbox × 288
enterprise-geodatabase × 277
python-2.7 × 238
python-addin × 237
fields-attributes × 236
error-000732 × 221
select-by-attribute × 219
shapefile × 209
parameters × 203