POST
|
Yeah, Esri should really include the typing information. I have a GitHub repo containing arcpy typestubs, but they are not complete. I used pyright to generate typestub files as a starting point, then have been cleaning them up gradually as I actually use the various classes, functions, etc..
... View more
03-05-2024
05:10 PM
|
2
|
0
|
878
|
POST
|
Thanks, but what I was asking is if there was a simple "Reset to defaults" REST endpoint or button in Manager or something of that nature. (I already am aware of how to look up what the defaults were and change them.) On our production ArcGIS Server, I can't make these changes myself and have to instruct someone else on what I want them to do. I was hoping there was a simple "reset" command I could point them to that I was not seeing in the documentation.
... View more
05-09-2022
08:14 AM
|
0
|
1
|
1036
|
POST
|
On my agency's ArcGIS Server, when you go to an individual map service's page, some of the "View in..." links at the top of these pages don't work correctly. The URLs are all http rather than https, and the JavaScript API links are currently configured to point to the old 3.X version of the API which is no longer supported and thus when the user clicks on the link the page they're taken to doesn't work. I found the documentation about how to EDIT these settings, but I was wondering if there was a way to "reset to Esri recommended defaults" rather than editing individual settings one-by-one.
... View more
05-05-2022
11:29 AM
|
0
|
3
|
1188
|
POST
|
I encountered this recently and opened a support issue. They told me it's a known bug. (They've not yet given me an ETA on a patch or fix yet.) #BUG-000146430 This is a really serious issue, as it prevents you from publishing GP services or sharing in a GP package from tools in an atbx. You're not allowed to publish tools without metadata, and you can't add metadata to the tools. This is how I found out about the bug. Luckily the logic of the tools were in Python scripts, so recreating the toolbox portion in the legacy format wasn't too difficult. I'd hate to be the person that had to recreate all their model builder models because of this bug.
... View more
05-03-2022
09:45 AM
|
1
|
0
|
1894
|
IDEA
|
.NET 5 (the next major version of .NET Core) is scheduled to be released in 2020, and will supersede the .NET Framework. Targeting .NET Standard going forward would be a good idea so you will be ready by then.
... View more
10-03-2019
04:14 PM
|
1
|
0
|
1741
|
POST
|
After upgrading to ArcGIS Pro 2.0, I am no longer having this issue. Perhaps there was a bug in earlier versions, but I don't know for sure.
... View more
07-03-2017
10:06 AM
|
0
|
0
|
691
|
POST
|
You're not assigning the URL to the esriConfig.portalUrl. You're currently creating an unrelated variable called portalUrl and assigning a value to it, while esriConfig.portalUrl remains unchanged.
... View more
06-21-2017
09:26 AM
|
0
|
4
|
3093
|
POST
|
Is there any way to call the arcpy.mp.CreateWebLayerSDDraft function outside of an active ArcGIS Pro session? I can't seem to find any way of programmatically logging in to ArcGIS Online through arcpy. """Publishes an ArcGIS Pro project's map to ArcGIS Online.
"""
import re
from os.path import abspath, exists
import arcpy
from arcpy import AddMessage, AddError
from arcpy.mp import ArcGISProject, CreateWebLayerSDDraft
def main(project_path='traffic-map.aprx',
service_name="Traveler_Info",
folder_name="Traveler_Info"):
"""Publishes a project map to a service
"""
project_path = abspath(project_path)
if not exists(project_path):
raise FileNotFoundError("File not found: %s" % project_path)
# Open the project
AddMessage("Opening %s" % project_path)
aprx = ArcGISProject(project_path)
# Get the first map
the_map = aprx.listMaps()[0]
the_layers = the_map.listLayers()
# Create the output path string by replacing the file extension.
draft_path = re.sub(r"\.aprx$", ".sddraft", project_path)
AddMessage("Creating %s from %s..." % (project_path, draft_path))
# Create the web layer SDDraft file.
try:
# TODO: Fails here with a RuntimeError that has no message if
# ArcGIS Pro is not open and signed in to ArcGIS Online.
CreateWebLayerSDDraft(
the_layers, draft_path, service_name, folder_name=folder_name,
copy_data_to_server=True, summary="Test service",
tags="test,traffic,traveler", description="Test Service",
use_limitations="For testing only")
except RuntimeError as ex:
if len(ex.args) > 0:
AddError("Error creating %s. %s" % (draft_path, ex.args))
else:
AddError(
"Error creating %s. No further info provided." % draft_path)
else:
service_definition = arcpy.server.StageService(draft_path)
arcpy.server.UploadServiceDefinition(service_definition)
if __name__ == '__main__':
main()
... View more
06-09-2017
11:02 AM
|
0
|
1
|
1243
|
POST
|
The ArcGIS JavaScript API only runs on the client-side (i.e., in the browser), so it shouldn't matter what technology you use on the server-side.
... View more
05-22-2017
11:29 AM
|
0
|
0
|
1200
|
POST
|
Have you tried using arcpy.da.UpdateCursor rather than the Calculate Field tool? That's how I would accomplish this task.
... View more
04-28-2017
08:45 AM
|
0
|
0
|
1499
|
BLOG
|
I happened to be looking at the Bower site today and noticed this message: ...psst! While Bower is maintained, we recommend yarn and webpack for new front-end projects! Also their latest blog entry (from last Oct.) is about using yarn instead of the Bower API.
... View more
04-25-2017
11:26 AM
|
0
|
0
|
2639
|
POST
|
The demo was pointing to some services that had been moved to a different server. I modified the demo to use an AGOL webmap to fix this issue.
... View more
03-03-2017
09:17 AM
|
0
|
1
|
1228
|
POST
|
If you’re not already, you’ll need to run a web server (e.g., IIS Express). You can’t run JavaScript files from other servers if your URL starts with file://.
... View more
02-27-2017
03:53 PM
|
0
|
4
|
1228
|
POST
|
You shouldn't have to rearrange any files. The folder structure should work as-is. If you can't get the code from the main branch working, try downloading from the gh-pages branch. That is literally where the demo is running from.
... View more
02-16-2017
11:31 AM
|
0
|
6
|
1228
|
Title | Kudos | Posted |
---|---|---|
2 | 03-05-2024 05:10 PM | |
1 | 04-30-2013 08:23 AM | |
1 | 05-03-2022 09:45 AM | |
1 | 06-30-2015 10:55 AM | |
1 | 03-31-2016 10:19 AM |