|
POST
|
This is a great suggestion. Having user/password saved in plain text is just bad form. And sadly, I've encouraged that in places (GitHub - arcpy/update-hosted-feature-service: Update and overwrite a hosted feature service on ArcGIS.com ) Maybe I'll try to update that sample with your approach. And, yes, its still very possible for someone to find out the credentials. However, any sort of security is better than no security. Thanks, James.
... View more
08-05-2016
06:07 AM
|
2
|
3
|
1807
|
|
POST
|
Hey Becky - The ability to use the .AGS file would be an excellent enhancement. I actually really like that idea as it hides the password from being inside your scripts. The only problem: from a pure Python code perspective, I have no way to get at the contents of the AGS file, nor is there any arcpy method that could consume the file to give me what I need. Basically we'd have to do something in the core software to assist in using the connection file to help the tools get what they need. I'll have a conversation about that with some team members. I understand the not knowing if something is stopped or started from the tool UI. Would it simply be enough to show in the UI something like "MyService [STOPPED]" or "Service2 [STARTED]" ? Or are you after an actual filter to only show certain services? I havent wrote any logic to filter, but if I dont consider it now, I probably wont look at making these tools "better" for another 4 years after this go.
... View more
08-04-2016
09:30 AM
|
1
|
2
|
2780
|
|
POST
|
I just came across this post and realize you might have a path forward. Just a note though - I've been trying to make time to refresh the toolkit. That includes introducing proper HTTPS support. If you're interested in it before its "done", its in a branch here: GitHub - khibma/ArcGISAdministrationToolkit at devupdates I'm close to being done. I just need to do some more testing. After that I'll update the arcgis.com sample with the newest and greatest.
... View more
08-04-2016
06:42 AM
|
5
|
5
|
2780
|
|
POST
|
Dylan, At 10.4 we enhanced Server in regards to updating database connections. If you're on 10.4, simply updating your datastore connection will update the reference for any service (feature, gp, etc) that referenced it. This topic has more info: Register your data with ArcGIS Server using ArcGIS for Desktop—Documentation | ArcGIS for Server (note that the GP Service has to have been published with 10.4 for this to work)
... View more
06-23-2016
10:32 AM
|
0
|
0
|
1881
|
|
POST
|
Come by the Analysis island in the Expo Tues/Wed/Thurs and look for me - we can chat about this. I'm also presenting a Creating Geoprocesing Services session, but wont be going over exactly what you're asking.
... View more
06-23-2016
10:30 AM
|
0
|
0
|
1881
|
|
POST
|
The publishing of more items (which are not web maps/web layers) to Portal is on the road map for an upcoming release. (Maybe 1.3, maybe 1.4.... I can't say with certainty of the date, but it is on the to-do list). These items are basically items you cannot publish today, like gp, image, etc. I don't have any time line on the direct publishing to server. Right now, Pro will publish to both ArcGIS.com (hosted services) and your local Portal, federated with ArcGIS Server.
... View more
02-18-2016
07:08 AM
|
2
|
1
|
693
|
|
POST
|
Do you have a reference to the doc you mentioned? Everything you've said is correct. However, Server underwent many, many changes between 10.0 and 10.1. As such, I'm not 100% confident that you could use the {'url' : 'http://myfile'} method at 10.0. I'm 100% sure you can at 10.1. (If the doc you have was written for 10.0, then I'd take it as true you can use this method) The other thing, and I'm sure you've tested it, but asking just to be sure - you can access the file you reference over HTTP?
... View more
02-01-2016
12:51 PM
|
0
|
1
|
579
|
|
POST
|
If the tool works as a regular tool before publishing, but not as a service, your parameter index are probably correct. My guess is when publishing it hasn't updated, or incorrectly updated the paths to either the templates, or the selected features you're passing in isn't working correctly. The first and easiest test is to consume the service back in ArcMap - ArcMap will always pass the features correctly. If you get the correct result there, but not the webapp, its something to do with how the service + web application is setup. If that isn't the problem, I'd try changing your first bit of code import os layouttemplatemxd = arcpy.GetParameterAsText(0) if arcpy.GetParameterAsText(0) else "StewardshipTractBoundaryMap" #I think this should work Layout_Template = arcpy.GetParameterAsText(0) if Layout_Template == '#' or not Layout_Template: Layout_Template = "StewardshipTractBoundaryMap" layouttemplatemxd = Layout_Template templatePath = 'D:/ArcGISData/Geoprocessing_Examples/Advanced_HighQualityPrinting3' Selecting_Features = arcpy.GetParameterAsText(1) Input_Polygons = "Stewardship" mxd0 = arcpy.mapping.MapDocument(os.path.join(templatePath, layouttemplatemxd + '.mxd') And if none of that does it, it might be how you're doing the select itself. It looks a little strange to me, setting the definition query then doing a select. Is that needed?
... View more
02-01-2016
06:22 AM
|
2
|
1
|
655
|
|
POST
|
A couple things to clear up - you say published to AGOL? Do you mean your ArcGIS Server (not ArcGIS Online)? You cannot publish GP Services to ArcGIS Online, you can place a reference to them, but the service itself exists on your ArcGIS Server (not arcgis.com) GP Services dont...lets say "work" with a user defined workspace. A workspace is an unsupported item for a GP Service, as such, it becomes hardcoded when you publish. Thats why you're seeing the user having no choice when they execute the service. If you go back and re-publish the service, inside the Service Editor if you go to that parameter, you'll see its hardcoded. There are ways to deal with providing an input workspace, but looking at your workflow, I dont think this is the path you need (or really want) to go down. Keep in mind, if this were to 'work', whatever directory the user was supplying as input would have to exist on the server itself, not a local path on their computer (I'm sure you can see possible problems here.) So, all that considered, some options: Looking at your script, my guess is your 'output' in the end is the text file which you're creating inside the directory the user has specified. Instead of asking for a directory to save a text file, you have a few options. You could specify a FILE itself, where the user would provide 'c:\temp\mytext.txt'. Alternatively you could ask for a STRING and use that to build a file and path, c:\temp\USERSTRING.txt. Or, better yet, since GP Services have a well defined pattern of where results get created, just use the options available to you and return the FILE (which you internally create/manage) to the end user. So (and I cant find the button to make this nicely formatted code....) do something like this: Code reportFile = os.path.join(arcpy.env.scratchFolder, "report.txt") # ... code that puts stuff in the file. arcpy.SetParameterAsText(0, reportFile) Tool Param (in the UI) output file | type=file | derived output
... View more
01-20-2016
10:44 AM
|
1
|
0
|
2129
|
|
POST
|
The output from Trace is actually a group layer. So you need to "select" the particular item out of the group layer you want before you can do something with it. In Modelbuilder, this is pretty straight forward as you'd use the Select tool (only available within Modelbuilder). With a script, you need to properly reference the layer inside the group that you want. arcpy.Snap_edit(Flags, "'Primary OH Conductor' VERTEX '30 Meters'") arcpy.TraceGeometricNetwork_management(El_Paso_Electric, "Storm_Net", Flags, "TRACE_UPSTREAM", "", "", "", "", "", "NO_TRACE_ENDS", "TRACE_INDETERMINATE_FLOW", "", "", "AS_IS", "", "", "", "AS_IS") network = arcpy.mapping.Layer("Storm_Net") if network.isGroupLayer: for sublayer in network: arcpy.AddMessage(" {} ".format(sublayer.name)) # Process: Select Data #arcpy.SelectData_management("Storm_Net", "ServiceLocation") # <--- dont use # Build up the path to the item you want, in this case, "Storm_Net" is my output Trace, and "ServiceLocation" is the item inside I want. arcpy.CopyFeatures_management("Storm_Net/ServiceLocation", outputFeatureClass) FYI: Output from the AddMessage to list items in the GroupLayer: ElectricDataset_Net_Junctions MiscNetworkFeatureBank SwitchBank CapacitorBank FuseBank RegulatorBank Light Generator DynamicProtectiveDeviceBank Motor ServiceLocation TransformerBank Flags SecondaryUGLineSection SecondaryOHLineSection PrimaryOHLineSection PrimaryUGLineSection
... View more
01-11-2016
08:05 AM
|
2
|
1
|
1763
|
|
POST
|
I'd give this help topic a read. It explains how KML is created based on the input features: Creating KML in ArcGIS for Desktop—Help | ArcGIS for Desktop
... View more
12-30-2015
06:31 AM
|
0
|
0
|
471
|
|
POST
|
Changing the output in Copy Features from something on disk to "in_memory\ManHoles" should 'make it fast again' (or comparable to before changing from MFL to CF). As for it ignoring the barriers -- I've got no idea how/why that would happen. Your barriers are right at the start of the model. This is step happens before copy features. Unless it has something to do with the coordinate systems still, but if that were the case I wouldnt expect your FLAGS input to work.
... View more
12-09-2015
10:16 AM
|
1
|
2
|
1899
|
|
POST
|
Simply by looking at the picture of the model, it looks correct. I would have personally used copy features at the end instead of MakeFeatureLayer....but I doubt that'd cause you any issues. The quick test here is - consume the service back inside ArcMap. If this works correctly every time, you know the service is good and the issue is related to the WAB configuration/use of the GPService. My guess at the issue: Its the WAB. Or the WAB you're using? Are you using a local developer version? If I take your GP Service URL and plug it into the ArcGIS Online WAB - the output from your service shows as I'd expect it to when configuring the widget. That is, the output is a points layer and I just need to set the drawing options. From your screen shot you see items like min/max scale as well as target layer.My WAB doesn't show me this. I'm not sure how or why you've got this, but to me that it seems like your configuration thinks the output of the GP Service is something else (not just a simple points layer output).
... View more
12-02-2015
09:32 AM
|
1
|
7
|
1899
|
|
POST
|
How are you referencing the executable? If you've got a full path variable: myExe = r'c:\folder\doSomething.exe' try swapping it to something like: myFolder = r'c:\folder' #this is the same item thats registered with the datastore myExe = os.path.join(myFolder, 'doSomething.exe') Or maybe you have it that way, and you want to switch it to the full path. I'm not in a position to test this right now, but I know one (actually though, both ways) should work. What version of Server?
... View more
12-01-2015
01:15 PM
|
0
|
1
|
941
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2023 06:37 AM | |
| 1 | 09-18-2025 07:07 AM | |
| 3 | 09-18-2025 06:52 AM | |
| 1 | 03-23-2023 12:07 PM | |
| 1 | 10-21-2024 12:40 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-30-2025
06:25 AM
|