|
POST
|
I'm rewriting a Python 2.x script so that it can be used in Pro. I am struggling to figure out the syntax for refreshing a map series in Python. I found this page: MapSeries—ArcPy | ArcGIS Desktop, and I know there is a refresh() method, but I cannot figure out how to use it. I tried lyt = aprx.listLayouts("AgLayout")[0]
for lyr in m.listLayers("Parcel*"):
lyr.definitionQuery = "JOINPIN = '201-02-0-00-00-012.03-0'"
lyt.refresh() Line 6 throws an error that says "AttributeError: 'Layout' object has no attribute 'refresh'
... View more
01-23-2019
01:35 PM
|
0
|
6
|
4996
|
|
POST
|
Of all things, it appears that I just needed an asterisk after my layer name to make it work: aprx = arcpy.mp.ArcGISProject("CURRENT")
m = aprx.listMaps("agmap")[0]
for lyr in m.listLayers("Parcel*"):
lyr.definitionQuery = "JOINPIN = '201-02-0-00-00-012.01-0'"
... View more
01-18-2019
02:14 PM
|
1
|
0
|
11884
|
|
POST
|
Good tip, thanks. Let's try this: aprx = arcpy.mp.ArcGISProject("CURRENT")
m = aprx.listMaps("Map")[0]
for lyr in m.listLayers("Parcel"):
if lyr.supports("DEFINITIONQUERY"):
lyr.definitionQuery = "JOINPIN = '201-02-0-00-00-012.01-0'"
... View more
01-18-2019
01:45 PM
|
0
|
2
|
11884
|
|
POST
|
My indents are good, and I tried the quotes like you have in your example (JOINPIN is a string). Still no luck. Other ideas?
... View more
01-18-2019
01:19 PM
|
0
|
4
|
11884
|
|
POST
|
I'm rewriting a Python 2.x script so that it can be used in Pro, and I'm stuck on setting a definition query for a layer. Here's what I tried in Pro's Python Window: aprx = arcpy.mp.ArcGISProject("CURRENT") m = aprx.listMaps("Map")[0] for lyr in m.listLayers("Parcel"): if lyr.supports("DEFINITIONQUERY"): lyr.definitionQuery = 'JOINPIN = 201-02-0-00-00-012.01-0' Then I thought maybe the definition query had to be written like a SQL statement, so I tried: aprx = arcpy.mp.ArcGISProject("CURRENT") m = aprx.listMaps("Map")[0] for lyr in m.listLayers("Parcel"): if lyr.supports("DEFINITIONQUERY"): lyr.definitionQuery = 'Join Pin is Equal to 201-02-0-00-00-012.01-0' Neither option generated an error message, but no definition query is set on the Parcel layer. Appreciate any help I can get! Documentation for moving from 2.x to 3.x for ArcPro doesn't have a lot of code examples that I can copy.
... View more
01-18-2019
12:43 PM
|
0
|
8
|
13426
|
|
POST
|
Your comment about the "messy" GDB made me realize that this particular point feature class has had delete features run on it many, many times. Sure enough, when I checked the OBJECTIDs on the newly appended data, they were running in the six digit range. I deleted the topology and then ran truncate table on that feature class to strip out all of the history. No more hanging on the delete features tool - it finished in seconds. Moral of the story: use truncate table whenever you can! Thanks for the brainstorming help, Dan.
... View more
12-10-2018
09:12 AM
|
0
|
1
|
2356
|
|
POST
|
I'm running the model from ArcCatalog, so no luck there. Knowing that, do you still recommend trying it in Pro?
... View more
12-10-2018
07:56 AM
|
0
|
3
|
2356
|
|
POST
|
Working with 10.5.1, Advanced Desktop license. I've got a model set up in Model Builder that starts with a step to Delete Features from a point feature class in a file geodatabase with about 55,000 points in it. The points are deleted quickly, but then the tool sits at 100% complete for about 10-15 minutes before going on to the next step in the model. Because of the number of steps in the whole model, I am reluctant to export to Python and deal with the mess of code that is generated, so I'm hoping to brainstorm possible causes of the hangup in Model Builder. If I have to go to Python, so be it. Just looking for alternatives.
... View more
12-10-2018
07:17 AM
|
0
|
5
|
2507
|
|
POST
|
Thank you so much for posting! I've been scouring the forums but hadn't come across this yet. We'll give this a try and see if it resolves the issue.
... View more
09-21-2018
06:18 AM
|
1
|
0
|
1580
|
|
POST
|
My team has three brand new iPads with Collector installed. They all do the same work – update the sign inventory in the field. We have a basemap permanently installed on their iPads, and when they are ready to go out to work, they download the sign inventory features for disconnected editing. When they come back in at the end of the day, they sync up their data. Afterward, we have them delete the features that they downloaded so that they can start fresh in the morning with a new copy of the data. Two of the iPads see this message when they go to Manage and Remove Map: Those two iPads never have any problems with synchronization. The third iPad, which regularly has synchronization issues, gets this message: We thought maybe the third iPad had a different version, so we uninstalled/reinstalled Collector on that iPad. When that didn’t work, we completely stripped that iPad down to factory settings and reformatted it from scratch. Still, it gives this message instead of the one that the other two get. We have that employee choose the “Remove features only” option when he gets that message. This used to work well, but for the last month, I've noticed that the replica is not being removed from the master database when they choose “Remove features only.” I could live with orphaned replicas that require manual cleanup, but this same iPad keeps throwing this error message when the user syncs his edits: And let's just make this a bit more confusing: his edits actually do sync into the associated version and we can reconcile and post with no problem. But Collector thinks that the edits did not go through. Bottom line is that I need the iPad to reliably sync with no error messages when the user comes back in from the field. I don't know if the orphaned replica has anything to do with our error messages, but I'm at a loss on what to try at this point.
... View more
09-20-2018
02:46 PM
|
0
|
2
|
1878
|
|
POST
|
I just discovered a similar issue with Edge on our work computers. None of the apps that I have on ArcGIS Online are able to load the features on the map. Visit https://gis.douglascountyks.org/mapgallery/ and click on any of these maps: Advanced Voting Location Finder Election Polling Place Lookup Floodplain Viewer Road Closures Sign Inventory Viewer Taxing Districts Voter Information Did you ever determine whether this was a browser security issue? If there is a setting that needs to be adjusted, I'd like to have our IT push it out to everyone. Screenshot:
... View more
08-10-2018
06:42 AM
|
0
|
2
|
2986
|
|
POST
|
In the April 2018 update, Esri added the ability to search the map. I turned that option on, but it's just using the Esri World Geocoder. I haven't gone back to see if it will honor any custom search settings that you create on your base map, but there aren't any custom search settings on my map right now.
... View more
05-04-2018
07:50 AM
|
0
|
0
|
1522
|
|
POST
|
Simple, yet elegant. My favorite kind of solution! Thanks, Francesco.
... View more
05-01-2018
08:22 AM
|
0
|
0
|
2830
|
|
POST
|
Hey Robert, any thoughts on creating a widget that allows the end user to submit feedback on the website to the organization? Maybe something simple like a button that could be configured to send an email to an email address specified by the website developer?
... View more
05-01-2018
08:05 AM
|
0
|
2
|
2830
|
|
POST
|
We've been using Collector for our sign inventory field maintenance for about 6 months now with the following setup: - ArcGIS online web map - Sign inventory published as a service from ArcGIS Enterprise 10.5.1 from a Windows 64-bit server running 2008 R2 Enterprise and SQL Server 2012. - Sign inventory is stored in SDE and consists of a point feature class to represent supports, three tables to track related signs, support maintenance, and sign maintenance. We have relationship classes set up to tie the tables and the point feature class together. - Field crews have brand new iPads. They download the sign editing service data in the morning, make edits in disconnected mode during the day, and then come back in the afternoon and sync with the master database. Here's my problem: some users are having intermittent problems synchronizing their edits. I have yet to find a pattern to the issue. Some times, there are many edits to be synchronized. Some times, very few. Everyone is working in a completely separate geographic area, so there should be no conflicts with data editing. The wifi connection is stable; we've had IT check the log files to see if issues arise, and nothing has turned up. Here is today's scenario: user downloaded data yesterday morning, made 5 edits, then returned in the afternoon and was unable to synchronize edits. User says that after getting the sync error yesterday, he left for the night. Then: "This morning he uploaded his map and the changes are not there. He has been getting a sync error but would close the app and restart it in the evening and then it would sync. He said that when he opens the app back up the red number on the sync button is still there and it sync’s fine." I checked the log file for the sign service and see this: The error at the top would have occurred at about the same time the user with issues would have attempted to sync. I'm sure there is a pattern out there and I'm not seeing it. Is anyone else experiencing issues similar to this? Any advice on what I could do?
... View more
03-14-2018
07:06 AM
|
0
|
0
|
1051
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | a week ago | |
| 1 | 05-08-2024 01:17 PM | |
| 1 | 12-16-2021 07:17 AM | |
| 6 | 04-23-2026 08:57 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|