|
POST
|
@FredMitchell can you share the service to an AGOL group and invite my account (jskinner_rats)? I can take a look to see if anything jumps out at me.
... View more
03-25-2024
12:08 PM
|
1
|
7
|
3649
|
|
POST
|
Hi @GeorgeClark , I use the following script to execute the webgisdr. Windows Task Scheduler executes the script each night, and the script will execute a BAT file to run the webgisdr. You may want to try this to see if it gives successful results.
... View more
03-22-2024
01:50 PM
|
0
|
3
|
5018
|
|
POST
|
@TylerT after adding a field to a referenced service, you will only have to restart the service for the field to appear.
... View more
03-22-2024
01:46 PM
|
1
|
0
|
2759
|
|
POST
|
I can't reproduce this. I'm working with Pro 3.2.2 and a File Geodatabase.
... View more
03-22-2024
03:05 AM
|
0
|
2
|
6445
|
|
POST
|
@kapalczynski you can run the Calculate Field on the feature layer and the edits will be reflected in the service: # Variables
portalURL = 'https://gis.esri.com/portal'
username = 'portaladmin'
password = 'p0rt@l@dmin1'
featureServiceURL = 'https://gis.esri.com/server/rest/services/pipes/FeatureServer/0'
whereClause = "Imported = 'No'"
# Sign into Portal
arcpy.SignInToPortal(portalURL, username, password)
# Make Feature Layer
arcpy.MakeFeatureLayer_management(featureServiceURL, "fLyr", whereClause)
# Calculate Field
arcpy.management.CalculateField(
in_table="fLyr",
field="FLAGFIELD",
expression="'YES'",
expression_type="PYTHON3",
code_block="",
field_type="TEXT",
enforce_domains="NO_ENFORCE_DOMAINS"
)
... View more
03-21-2024
11:42 AM
|
0
|
3
|
3085
|
|
DOC
|
@Tim-Woodfield I can't say for sure why this is occurring, but if you are working with Portal, it may be just as fast to execute ArcGIS Pro's Delete Features and Append tools.
... View more
03-21-2024
09:57 AM
|
0
|
0
|
17353
|
|
POST
|
I tend to stick to arcpy when the functionality is available in both arcpy and ArcGIS API for Python. It minimizes the code you will have to write. For the WHERE clause, you can first create a Feature Layer using the Make Feature Layer tool.
... View more
03-20-2024
11:57 AM
|
0
|
5
|
3099
|
|
DOC
|
@Eliot_Reid I had a feeling this may be the case. SAML is not supported. If you can, create a built-in Administrator account and use that instead.
... View more
03-20-2024
11:33 AM
|
0
|
0
|
42179
|
|
POST
|
Hi @kapalczynski , An easier approach may be to use arcpy. Ex: # Variables
portalURL = 'https://gis.esri.com/portal'
username = 'portaladmin'
password = 'p0rt@l@dmin1'
featureServiceURL = 'https://gis.esri.com/server/rest/services/pipes/FeatureServer/0'
# Sign into Portal
arcpy.SignInToPortal(portalURL, username, password)
# Calculate Field
arcpy.management.CalculateField(
in_table=featureServiceURL,
field="FLAGFIELD",
expression="'YES'",
expression_type="PYTHON3",
code_block="",
field_type="TEXT",
enforce_domains="NO_ENFORCE_DOMAINS"
)
... View more
03-20-2024
11:20 AM
|
0
|
8
|
3108
|
|
DOC
|
@Eliot_Reid Open the python console, or new Notebook in Pro by going to Analysis tab > Python dropdown: Enter the following code, replacing https://gis.esri.com/portal with your URL to portal: from arcgis.gis import GIS
gis = GIS('https://gis.esri.com/portal')
source_users = gis.users.search(max_users=10000)
source_users Ex: Does this execute successfully?
... View more
03-20-2024
10:52 AM
|
0
|
0
|
42199
|
|
POST
|
Remove the CCAP feature class from your map and try executing the tool again. I think this is placing a lock on the feature class, which is causing this error.
... View more
03-19-2024
03:47 AM
|
0
|
4
|
6463
|
|
POST
|
Try the attached tool. First, update the gdb variable by right-clicking on the toolbox > Properties > Execution: Next, double-click the Script tool. Click the dropdown next the pencil and select Points. Create two points and execute the tool.
... View more
03-14-2024
12:03 PM
|
0
|
1
|
14134
|
|
POST
|
Hi @chill_gis_dude, Take a look at the following scripts here. The scripts won't accomplish exactly what you're looking to do, but should provide some guidance. For example, here is the portion of code that creates the Enterprise account by reading information from a CSV file:
... View more
03-13-2024
09:56 AM
|
1
|
1
|
2321
|
|
POST
|
@TonyAlmeida , Make sure your map is in coordinate system (26770), then try the following: import os
import arcpy
# Variables
input = arcpy.GetParameterAsText(0)
gdb = r"C:\temp\PointsTest.gdb"
wkid = 26770
# Environment Variables
arcpy.env.overwriteOutput = True
arcpy.env.outputCoordinateSystem = arcpy.SpatialReference(wkid)
arcpy.env.workspace = gdb
array = arcpy.Array()
with arcpy.da.SearchCursor(input, ["SHAPE@X", "SHAPE@Y"]) as cursor:
for row in cursor:
pt = arcpy.Point(row[0], row[1])
array.add(pt)
del cursor
polyline = arcpy.Polyline(array)
arcpy.AddMessage("Copying line features")
arcpy.CopyFeatures_management(polyline, "line_test")
# Retrieve the last point's coordinates and calculate length
with arcpy.da.SearchCursor("line_test", "SHAPE@") as cursor:
for row in cursor:
last_point = row[0].lastPoint
X = last_point.X
Y = last_point.Y
length = row[0].length / 5.28
arcpy.AddMessage(f"Length: {length}")
# Prepare values to insert into the point layer
row_value = (length, (X, Y))
# Use arcpy.da.InsertCursor with a context manager to insert rows into the point layer
arcpy.AddMessage("Inserting values into point layer")
with arcpy.da.InsertCursor("CCAP", ["SiteNum", "SHAPE@XY"]) as cursor:
cursor.insertRow(row_value)
del cursor
... View more
03-13-2024
08:35 AM
|
0
|
1
|
7940
|
|
POST
|
@TonyAlmeida, Can you post the updated code your using?
... View more
03-13-2024
05:45 AM
|
0
|
3
|
7946
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 weeks ago | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Online
|
| Date Last Visited |
Friday
|