|
POST
|
Correct. In my opinion, the arcpy.listLayers function should probably be used on objects already in an ESRI environment. Since you are adding data from a file path, you should dynamically build the layer source from the data locations (hard coded folder path and loop through layer names).
... View more
08-02-2022
06:51 AM
|
1
|
0
|
1004
|
|
POST
|
Make sure that the "m.addLayer(layer)" is indented. Try updating it to look like this: for layer in list_layers: m.addLayer(layer)
... View more
08-02-2022
06:13 AM
|
0
|
1
|
2257
|
|
POST
|
Hey MH84, I can give this a shot. What you are going to need to do is crate a Map object to add the layers to. That can be done through something like this: aprx = arcpy.mp.ArcGISProject(r"C:\Projects\YosemiteNP\Yosemite.aprx") m = aprx.listMaps("Yosemite National Park")[0] once you have a map object ("m" in this case), you should be able to loop through those layers and add them to the map with an addLayer call. That would look something like this: m.addLayer(inLayer) I grabbed the first code block from ESRI's docs, the link is below (I also highly recommend checking out other pages on that site, they can be really helpful): Map—ArcGIS Pro | Documentation
... View more
08-02-2022
04:07 AM
|
2
|
8
|
2267
|
|
POST
|
I have a geoprocessing tool published from ArcPro that takes some point geometry as an input. The input is in a GPFeatureRecordSetLayer parameter and utilizes a layer file to allow the user to input multiple types of points. This layer file is used in the tool when run in ArcPro, but when published to Portal, the input geometry only uses the default point geometry and no option for the users to select the point type and different symbology. Is there a way to get the hosted version of this tool to utilize this layer file and more complex input? Also is there a way to get the user to edit the attribute data of the input geometry? That would also be a workaround to this issue. Any help would be appreciated! Using ArcGIS Pro 2.9.3 and on Enterprise 10.9.1
... View more
08-01-2022
02:54 PM
|
0
|
0
|
529
|
|
POST
|
Hello, For the first question, I would use the "File" parameter, you would just need some additional validation to ensure that the file type is what you are looking for, either at the beginning of your script or in the validation settings of the tool. When publishing a geoprocessing tool to the server, you first need to run the tool, you can then share it from the geoprocessing history, here is a link to a page that outlines this workflow: Quick tour of authoring and sharing web tools—ArcGIS Pro | Documentation Hopefully this helps!
... View more
06-22-2022
05:14 AM
|
0
|
0
|
988
|
|
POST
|
Hello, I have a GP tool that I was able to configure and run successfully in a local ArcPro environment that takes some inputs and creates some template datasets for the user. This works as expected when run within ArcPro and everything gets created and zipped no problem. When I originally published this as a custom GP service, I was also able to get this to work on the server and export a zip with all the files I needed. I did a restart on our hosting server and when the system came back online, this tool was (and is still) not working. When I checked the logs, I found that the service is timing out, and not erring out on any of the lines of code. After some additional digging, the tool gets hung up on the same line of code each time: Fig1_Layout = TemplateProject.listLayouts("*Template*")[0] I republished the tool a bunch of times while trying to figure out where exactly it was getting hung up, and have also increased the max time allowed per use in the service’s settings to make sure that this wasn’t just too long of a tool or any issue with the way the tool was shared. I was wondering if anyone might have some ideas on how I can continue to try to figure out what is going on. Considering this ran fine before I restarted the hosting server, I am hoping this may be able to be fixed by resetting something on the machine but I am not totally sure about that. Thank you for any help!
... View more
06-21-2022
02:36 PM
|
0
|
0
|
382
|
|
POST
|
Hello, I am working on a GP tool I am hoping to host on portal that will take some inputs from the user and compile some datasets for them. I was hoping to package up all the outputs into a .zip and serve it back to the user as a download in the same session that the tool is run in. Is this possible? I am on Portal/Server 10.9.1.
... View more
06-14-2022
04:13 AM
|
0
|
2
|
874
|
|
POST
|
Hey Ismael, thank you for taking a look at this. My pulldata() calls are in the calculation column for fields "Agent_Organization","Agent_JobTitle" and "Agent_Email". Cells K37-K39. If they need to be in a different column to run, I don't think that would be a problem. I appreciate you clarifying that they should be working the same in the web app vs the dashboard.
... View more
04-11-2022
12:41 PM
|
0
|
0
|
699
|
|
POST
|
Hello, I have a survey with a couple pulldata() calls on an external csv. These work just fine in most situations (Connect and Web Survey), but not when the form is embedded in a dashboard where it is intended to be used. Is there any difference between the web form version of a form and the embedded dashboard version that would cause this? I have attached my form, and here are the fields in the csv that I am using: name label Organization Title Email
... View more
04-10-2022
02:27 PM
|
0
|
2
|
809
|
|
POST
|
Hello, I have a hosted feature layer with multiple layers, all with attachments enabled that I am trying to export to a file geodatabase to download locally. When I do this in ArcGIS Online, a geodatabase is created, but it is only 1kb. Also when trying to export from python, I get the following error raise Exception("Could not export item: %s" % self.itemid) Is there anything I can do to get around this?
... View more
03-31-2022
07:02 AM
|
0
|
0
|
572
|
|
POST
|
Hey Eric, Was a solution ever reached on this? I have had a co-worker experience similar issues during a similar workflow, but only intermittently (running a Project() on multiple features to the same output location and having some complete before getting this error).
... View more
03-12-2022
01:09 PM
|
0
|
1
|
13891
|
|
POST
|
I got something published as well, hopefully things are resolved.
... View more
01-13-2022
08:06 AM
|
1
|
0
|
10865
|
|
POST
|
Hello, I have some feature layers that I am trying to publish to ArcGIS online. When doing this from ArcPro (2.9.1) my progress bar gets to "Upload service definition" and gets hung up. When checking the log for this, there does not seem to be an error, just no progress past this step. When I try to do the same thing from ArcMap (10.8.1), I get a similar experience, just with the progress bar text reading "Extracting files from service definition". Is there anything I can do locally to troubleshoot this issue? Without any error or log of what is wrong I am not sure how to best solve this problem. I have published services from both ArcPro and ArcMap before with zero issue using the same workflow so I am not sure what is going on. Any help would be appreciated!
... View more
01-12-2022
03:46 PM
|
5
|
14
|
11116
|
|
POST
|
Yeah I did stumble upon the Metadata class, it seems to work on whole layer metadata instead of the information related to certain areas or features. Could this data be accessed in a similar way to a feature class? Run a select by location off a point or polygon and then use a search cursor with the date field passed in? When running that code I get an "ERROR 000368: Invalid input data." which I think is due to a basemap layer not being selectable.
... View more
12-27-2021
11:18 AM
|
0
|
0
|
1130
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-24-2025 02:07 PM | |
| 3 | 11-07-2025 09:23 AM | |
| 9 | 11-07-2025 08:12 AM | |
| 1 | 08-07-2025 07:47 AM | |
| 1 | 05-13-2025 11:00 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|