|
DOC
|
@ModernElectric it appears the ArcGIS API for Python will not work with attachments. I believe the reason is that is maintains Global IDs. However, you can use ArcGIS Pro's Truncate and Append tools to perform the same steps. In the Append tool's environment variables, Maintain Attachments is automatically checked: Note: this tool will fail if you check the option Maintain Attachments and Preserve Global IDs. It has to be one or the other.
... View more
09-21-2023
12:38 PM
|
0
|
0
|
27728
|
|
POST
|
Hi @shildebrand , You can use the requests module to do this. Below is an example: import requests
# Variables
url = 'https://some.server.com/test.pdf'
exportLocation = r'c:\temp\test.pdf'
response = requests.get(url)
with open(exportLocation, 'wb') as f:
f.write(response.content)
... View more
09-21-2023
11:13 AM
|
0
|
1
|
2630
|
|
DOC
|
@ModernElectric you can try to unregister the replicas. Ex: import arcgis
from arcgis.gis import GIS
# Variables
username = 'jskinner_rats'
password = '********'
itemID = 'af9232b68fd247148239731c6a3fcd58'
gis = GIS('https://www.arcgis.com', username, password)
lyr = gis.content.get(itemID)
flc = arcgis.features.FeatureLayerCollection(lyr.url, gis)
replicas = flc.replicas.get_list()
print(replicas)
# Unregister replicas
for replica in replicas:
flc.replicas.unregister(replica['replicaID'])
... View more
09-21-2023
05:57 AM
|
0
|
0
|
27750
|
|
POST
|
I put together a document on sending notifications using the notify method.
... View more
09-18-2023
09:27 AM
|
0
|
1
|
3935
|
|
DOC
|
Recently I was working with a customer that wanted to send an e-mail notification from ArcGIS Online Notebooks. I’ve come to find that ArcGIS Online notebook containers have a blocking firewall that blocks the outbound SMTP connection. So, we were unable to connect to an external SMTP server (i.e. Office365) to send an e-mail. However, we were able to find a workaround using the Group object’s notify method. The notify method can send an e-mail to any or all users in a Group. In this example, the customer wanted to notify a user that their account would be disabled when they haven’t logged in within 90 days. 1. First step is to create a Group in AGOL. Since any user could potentially be notified, all named users have been added to this group, All Users. No content needs to be shared to this Group, so I’ve set the Contributors to only the group owner and managers: 2. Make note of the Group ID from the URL: 3. Reference this group in your Notebook: 4. Create a list of all named users 5. Check which users have not logged in within 90 days. Disable those accounts, and add that username to a list called userList 6. If there were users that were disabled, the userList can be passed to the notify method with an e-mail subject and message of your choice: Example e-mail message: Attached is the Notification Example notebook/script.
... View more
09-18-2023
09:24 AM
|
13
|
15
|
10954
|
|
POST
|
Hi @kapalczynski , Your workflow sounds correct. You can use the following script in the document below to perform the truncate/append, or just use arcpy's Truncate and Append tools. https://community.esri.com/t5/arcgis-online-documents/update-hosted-feature-service-with-feature-class/tac-p/1143563
... View more
09-18-2023
08:26 AM
|
0
|
0
|
1453
|
|
POST
|
Hi @RyanUthoff , I ran into a similar issue with my ArcGIS Server instance. To fix the issue, I created a .bat file with the following line: net start "arcgis server" I then configured a Group Policy to execute this BAT file upon startup: 1. On the ArcGIS Server machine, open Local Group Policy Editor by going to Start > Run > gpedit.msc 2. Navigate to Computer Configuration > Windows Settings > Scripts (Startup/Shutdown) 3. Double-click Startup 4. Under the Scripts tab click Add 5. For Script Name browse to the .bat file created previously
... View more
09-18-2023
07:28 AM
|
2
|
1
|
4451
|
|
POST
|
Hi @Savannah2019 , Did you set up the model to run as documented here? If so, you can open Windows Task Scheduler on the server, right-click the scheduled model > Properties and set to execute the task whether the user is logged in or not:
... View more
09-18-2023
06:58 AM
|
0
|
0
|
3843
|
|
POST
|
Hi @DonMorrison1 , Try deleting the GP History from the geodatabase to see if that improves performance: https://support.esri.com/en-us/knowledge-base/how-to-delete-geoprocessing-history-from-a-geodatabase-000027149 I did find one issue with the script when running with ArcGIS Pro 3.1. I had to remove db, from the below line:
... View more
09-18-2023
06:53 AM
|
2
|
0
|
2329
|
|
POST
|
Hi @MitchellAspinall , Try adding the layer using the addLayer method. Below is an example: import arcpy
# Reference Project and Map
aprx = arcpy.mp.ArcGISProject("CURRENT")
m = aprx.listMaps("*")[0]
# Create Feature Layer
arcpy.AddMessage("Create feature layer")
featureLayer = arcpy.MakeFeatureLayer_management(r"C:\TEMP\Python\Test.gdb\Earthquakes", "EarthquakesLyr")
# Add Layer to Map
arcpy.AddMessage("Add layer to map")
layer = featureLayer.getOutput(0)
m.addLayer(layer)
... View more
09-18-2023
06:40 AM
|
0
|
0
|
3588
|
|
POST
|
@MuhammadNaufalIhsan , Note: Exercise extreme caution when connecting to Portal's PostgreSQL database 1. Open command prompt 2. Change the directory to portal's PostgreSQL bin directory. Ex: c:\arcgisportal\pgsql_14.5\bin 3. Connect using the initial Portal Administrator username/password when portal was installed: If you do not know the username/password, this can be updated through Portal Administrator Directory > System > Database:
... View more
09-18-2023
05:56 AM
|
3
|
3
|
6781
|
|
POST
|
@RiccardoKlinger I believe this depends on the heap size of ArcGIS Server: https://enterprise.arcgis.com/en/server/10.9.1/publish-services/windows/general-considerations-for-using-geoprocessing-services.htm There is a file size limitation for uploading data capability when sharing a geoprocessing service and downloading output data when running the geoprocessing service. The limitation depends on the heap size of the federated server that hosts the geoprocessing service. The default server heap size is 64 MB; however, the size can be modified by the server administrator if needed. Check with your server administrator to increase the heap size in the following instances: Uploading raster data larger than 64 MB Uploading feature data close to or larger than 64 MB Downloading feature data close to or larger than 64 MB Below is a link on how to change the heap size: https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/share-analysis/geoprocessing-service-settings-advanced.htm#GUID-17815A98-2756-486F-AC2D-22672E0FCA28
... View more
09-18-2023
05:46 AM
|
1
|
0
|
1156
|
|
POST
|
Hi @RobertoGSYS, Does the WKID you have specified match the coordinate system of your output feature service? Can you share the WKID you're using?
... View more
09-18-2023
05:38 AM
|
0
|
1
|
1528
|
|
DOC
|
@EthanSmith2 are you working with an ArcGIS Enterprise hosted feature service, or AGOL hosted feature service? And, what version of the arcgis api for python are you using?
... View more
08-30-2023
10:01 AM
|
0
|
0
|
27947
|
|
POST
|
Can you upload a sample of your data? Also, I try to avoid shapefiles when possible. Can you convert your shapefile to a File Geodatabase feature class and see if exhibit the same behavior?
... View more
08-28-2023
03:35 AM
|
0
|
0
|
6691
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month 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 |
7 hours ago
|