POST
|
I need a way to code signing in and signing out of ArcGIS Online from a Python toolbox run within ArcGIS Pro. The existing tool, arcpy.SignInToPortal() , is flaky. It appears there is no arcpy.SignOutOfPortal(). Problem 1: I have found that if I open ArcGIS Pro and do not sign in this is indicated in the upper right corner of the application as 'Not signed in'. If I run the Python arcpy.SignInToPortal() and provide portal URL, and good credentials then it appears I am signed in by the change in the text in the upper right corner of the application. Often times, however, I can not access authorized data. If I try to add a layer by hand from ArcGIS Online I am prompted to sign in even though the text in the upper right corner indicates that I already am signed in. Problem 2: If ArcGIS Pro remembers me from a previous session when I start the program I get logged in as a specific user automatically. There are times, however, when I don't want to be logged in as that user. Lets say I, or one of my toolbox users, need to run a Python toolbox script to back data up from AGOL to our local server. This should run as a user that does not have write privilege to AGOL. I thought to place arcpy.SignInToPortal() at the top of my script and provide a user credential that does not have write permission. Although I get no error when running this command the user in the upper right corner of ArcGIS Pro does not change. It indicates I remain signed in as the user from the previous session. Problem 3: There appears to be no arcpy.SignOutOfPortal() command. If there was I could use it before using arcpy.SignInToPortal() to assure the user automatically signed in is no longer current. Then if arcpy.SignInToPortal() worked I could be sure the current user is one of appropriately permitted to run a script to backup date from AGOL to our servers.
... View more
06-08-2020
03:38 PM
|
0
|
2
|
1231
|
POST
|
I understand metadata a little better now. There are three kinds of metadata. There is the metadata that describes a map, an ArcGIS project. There is metadata that describes a layer, as in layerfile. There is metadata that describes a datasource, the original standard GIS dataset metadata. Components from these types of metadata wind up on AGOL Feature services which may have many Feature layers within them. Each Feature layer indexed within a Feature service represents an original GIS dataset. ESRI should provide a good crosswalk to document metadata and distinguish source to destination of each important metadata component through the publishing process. My most recent publishing routine captures metadata components satisfactorily. First I add a datasource to ArcGIS Pro. On the Layer Properties' Metadata panel notice the 'Copy data source's metadata to this layer' button. If you click this button many fields of metadata on the datasource will transfer to the layerfile. I save the layerfile after clicking this button. It seams the layerfile is an important carrier of metadata components through the publishing process. I then use getWebLayerSharingDraft, exportToSDDraft, and StageService to prepare the package. Finally, I use REST url to upload and publish: https://"+g_Portal+"/sharing/rest/content/users/<user>/addItem https://"+g_Portal+"/sharing/rest/content/users/<user>/publish
... View more
03-10-2020
11:26 AM
|
0
|
5
|
1458
|
POST
|
Thanks. I found this worked but modified for version 3.x onOpen this._clickEvt = this.map.on("click", lang.hitch(this, this._onMapClick)); onClose this._clickEvt.remove();
... View more
09-06-2018
01:58 PM
|
0
|
1
|
310
|
POST
|
Simple question. I placed this.own(on(this.map, "click", lang.hitch(this, this._onMapClick))); in postCreate to start my widget listening for mouse clicks. How to I undo this command on widget onClose? Thanks.
... View more
09-06-2018
11:45 AM
|
0
|
3
|
382
|
POST
|
I can see how having all the configs in one place would be helpful. I need to edit my Gruntfile.js to copy changes as I make them to the apps configs folder. Thanks.
... View more
08-31-2018
10:59 AM
|
0
|
0
|
365
|
POST
|
I happened upon a good video here "Web AppBuilder for ArcGIS Advanced Development Tools and Techniques - YouTube " and managed to get Yeoman and grunt working to streamline my development workflow. One issue I find is that my custom widget config.json winds up in two places under server/apps/n. It is in the server/apps/n/widgets/x (with a name like config.json) and it is at server/apps/n/configs/x (with the name like config_widgets_x_Widget_n.js). The trouble is that grunt copies from my repo only to server/apps/n/widgets/x. So multiple copies of the custom widget config get out of sync. Referencing the config in javascript don't work while referencing in html by ${} will. I found my custom widget x listed in server/apps/n/config.json and changed its config property from the path server/apps/n/configs/x to the path server/apps/n/widgets/x. Now all seams to work. I even renamed the duplicate config_widgets_x_Widget_n.js in server/apps/n/configs/x to xconfig_widgets_x_Widget_n.js to see if the app would miss it but it don't. Why is a duplicate custom widget config kept in server/apps/n/configs/x? Will the change i made to server/apps/n/config.json cause any unintended consequence?
... View more
08-31-2018
10:47 AM
|
1
|
2
|
477
|
POST
|
Wow. This is a real problem. We use layerDef all over the place. Some apps use jsapi 2.8. It would be good to know how far we may have to roll back the server version to accommodate jsapi 2.8.
... View more
02-24-2017
10:46 AM
|
1
|
0
|
1294
|
POST
|
We have large, statewide, datasets which are updated frequently. These can't be drawn reliably as feature layers on the web (too many features) and it takes too long to make map tiles of them. Vector Tile Layer is a great option but, we have large overlapping polygons and have conventionally used standardized polygon hatch symbology so small polygons could be seen if under larger overlapping polygons. Unfortunately, Vector Tile Layer does not support hatch. I wonder why not and if there is any play to improve symbology options to allow hatch.
... View more
10-28-2016
11:46 AM
|
0
|
0
|
609
|
POST
|
What is the equivalent of arcpy.mapping.CreateMapSDDraft in arcpy.mp when I need to automate the publishing of a raster dataset or large vector dataset as a Map Image to ArcGIS For Portal? Looks like this is missing from arcpy.mp and I can only publish Feature or Tile with arcpy.mp.CreateWebLayerSDDraft.
... View more
09-14-2016
03:12 PM
|
0
|
2
|
3122
|
POST
|
Thanks for the confirmation. I have scoured those pages. Perhaps in the future we could have more api access. Thanks.
... View more
07-06-2016
04:44 PM
|
0
|
1
|
342
|
POST
|
Thanks for the reply. The command works to prepare the draft. I have successfully published the prepared draft using the arcpy StageService and UploadServiceDefinition commands. The trouble is the CreateWebLayerSDDraft command does not pass on the summary, description, credits, and tags I specify. It is as if I had not used them. It also does not pay any mind to the folder I specify. As a work around I have been able to get the draft published in the right ArcGIS Online folder and display description and tags using the upload and publish REST endpoint’s arguments. I have not been able to find a way to get summary and credits populated, however, as they are not exposed on these endpoints. Ideally I could just automate the population of the ArcGIS Pro's Map's Properties/Metadata panel. It seams that what you put there always winds up in the right place on the ArcGIS Online published service's pages. I can't find an API to populate those ArcGIS Pro Map fields. An ESRI tech recommends that the summary, description, tags, and credits be specified as follows: summary='mysum', description='mydesc' etc which is not immediately apparent in the documentation as there is no example of optional parameter usage. I can't get that to work either from pasting code into ArcGIS Pro's Python window.
... View more
07-06-2016
04:35 PM
|
0
|
3
|
1458
|
POST
|
The documentation here: CreateWebLayerSDDraft—ArcPy | ArcGIS for Desktop does not show samples of using this command with the optional parameters. I am having no luck using any parameters beyond service_type. The parameters seam to be ignored. Though the draft is created successfully it goes in the default ArcGIS Online user folder and no description, summary etc. values make it to the published service listing. Has anybody got good working examples using optional parameters?
... View more
07-06-2016
03:53 PM
|
0
|
11
|
3561
|
POST
|
This command requires an .mxd as input map. I need to be able to use it in ArcGIS Pro and send it a map from the Contents panel. How can I kick off package creation in ArcGIS Pro?
... View more
07-06-2016
03:47 PM
|
0
|
1
|
1647
|
POST
|
How can I assign values for Title, Tags, Summary, Description etc. using Python? Is there api access to these values?
... View more
07-06-2016
03:41 PM
|
0
|
3
|
1456
|
Title | Kudos | Posted |
---|---|---|
1 | 02-24-2017 10:46 AM | |
1 | 08-31-2018 10:47 AM |
Online Status |
Offline
|
Date Last Visited |
11-24-2022
05:50 PM
|