POST
|
Hi again! That worked perfect. Many thanks! Do know about security settings for a service? I didn't get those settings in the REST reply. Do you know if there another REST call to get /set roles permitted to a certain service? I've looked around to all examples but can't figure out which one to use. -Anders
... View more
11-29-2020
02:13 PM
|
0
|
0
|
205
|
POST
|
Many thanks! That seems reasonable. I will try that solution.
... View more
11-24-2020
10:48 AM
|
0
|
0
|
280
|
POST
|
I'm connecting to a stand-alone ArcGIS Server. Also didn't know there where two versions of python API. The way I use it is by, in the Python file, import arcpy. Then I just use the functionality that is inside. I use methods like: arcpy.UploadServiceDefinition_server arcpy.CreateRasterDataset_management arcpy.gp.Combine_sa if that says anything?
... View more
11-24-2020
07:49 AM
|
0
|
1
|
314
|
POST
|
Is it possible to set for example Capabilities for a running specific map service through the arcpy Python API? I searched for methods that can help me with this but can't find anything. Let's say I want to activate WMS för a specific service. Then I want to make a call to the server and activate that setting. And then restart the service. I have managed to publish, stop, start, remove services via arcpy but now I want to make changes in the configuration but can't figure out how.
... View more
11-24-2020
07:23 AM
|
0
|
6
|
337
|
POST
|
I will answer this myself since I solved the problem. Short code to loop through current layers and get name of the gdb for all of them. If the source is the same for all layers each layer will show the same gdb. The dataSource printed below contains beside name of the gdb, also name of the layer. To extract just the name of the gdb you can use a method like: import os def getPath(source): # If there's a backslash, convert them to slash. Then you don't have to bother about backslash that also # work as a escape character. source = source.replace(os.sep, '/') s = source[:source.rfind(".gdb")+4] return s mxd = arcpy.mapping.MapDocument("CURRENT") for df in arcpy.mapping.ListLayers(mxd): if df.isFeatureLayer: print df.dataSource print df.datasetName gdbPath = getPath(df.dataSource) print gdbPath
... View more
05-06-2020
07:14 AM
|
1
|
0
|
86
|
POST
|
I want to read the name of the local gdb currently checked out from a map service. This is because I want to write some Pythoncode to access it. My problem is that the name will change and I cant know it in advance. So, what do I do? 1. Connect to a map service and drag the service to the layer area in ArcMap. 2. Right click on the group layer (which has the same name as the service). 3. Select "Edit Features/Create Local Copy for Editing" 4. Now I got a local copy with a random name. It can be something like: "C:\temp\NNK\nnkautv1_plsql\fs129D23DB12304BF58962DB1A9F1037AE.gdb" 5. And now the question: How do I figure out this name and location?
... View more
04-30-2020
01:40 AM
|
0
|
1
|
129
|
Online Status |
Offline
|
Date Last Visited |
11-30-2020
04:39 AM
|