|
POST
|
In this post from June 2020 I showed a problem with rematching an address. I'm using ArcGIS Pro 2.6 now and the problem persists. Here is my work flow: I have a selected set of unmatched addresses that I am stepping through interactively. I make a change to an address, <tab> and click apply. And I'm pushed back to the beginning of the selected unmatched records where I then manually advance (again) to the address I just changed so I and check it and I go back to the beginning of the selected list. This is more than an irritation, it's really counter-productive. If you have anything more than a few records selected it's really a pain in the backside. In the last post @ShanaBritt , you mentioned you couldn't replicate the problem. Here's a gif of me replicating it today, 1/27/2021... Rematch.gif
... View more
01-27-2021
03:40 PM
|
1
|
0
|
2200
|
|
POST
|
If you google that error number (esri error 000732) you'll find https://support.esri.com/en/technical-article/000010149 which just describes what's going on. Looking at the arcpy.Rename_management() method help, it appears to work for actual data sets rather than a layout object. I'm not sure what would work for renaming a layout, but I've got a little bit of time before I'm off to zoom-meeting land so I'll keep digging. Perhaps someone else knows?
... View more
01-27-2021
11:41 AM
|
1
|
1
|
3854
|
|
POST
|
Glad to hear you got it figured out. Having "Exclude from application evaluation" checked seems to be a cure all!
... View more
01-27-2021
08:03 AM
|
0
|
0
|
7867
|
|
POST
|
I noticed the slashes in my path were facing the other direction. Aside from that they were the same, and fixing it made no difference (although probably good to have corrected them). Slash direction should'nt matter to python, what does matter is if you don't use the r in front of it so the interperter reads it as raw text. Otherwise you have to escape the slash with another slash and I don't like doing that.
... View more
01-26-2021
03:35 PM
|
1
|
0
|
5110
|
|
POST
|
In our enterprise geodatabase, I only use NextSequenceValue("AddressPointID") I don't use db.name.sequence_name. That's in a traditional sde type of geodatabase, not a branch versioned/service though...
... View more
01-26-2021
02:55 PM
|
0
|
0
|
7880
|
|
POST
|
Perhaps you could post what works and what does not in a code edit window? I'm not a fan of using os.path, but lots of folks are. I prefer just copying and pasting the full path of a feature class or table into a script. In Pro, open a catalog pane while in a map view. Highlight the object you want and click Copy Path. JoeBorgione_0-1611698828772.png use it this way: fc = r'M:\HansenSQL\HansenGeocoding\HansenGeocoding.gdb\ADDRESS_Geocoded'
... View more
01-26-2021
02:08 PM
|
0
|
2
|
5124
|
|
POST
|
A couple things about if statements in python: if something = value: will never work. if something == value: is the way to do it. I've never seen a wild card work in python, perhaps someone else can make it work for you. But this ought to get you going: if fc.startswith('PG'): I assume you have already defined the variable fc although you don't show it.
... View more
01-26-2021
01:45 PM
|
4
|
0
|
3209
|
|
POST
|
This is not correct. But to Network Analyst it is. I understand that problem after working in 9-1-1 for many years and using NA to get fire and ems routed to a location. The only thing I could do is move my address points closer to the actual street that accessed it.
... View more
01-26-2021
10:40 AM
|
0
|
0
|
1236
|
|
POST
|
I did a google search on 'ArcGIS Arcade Update Related Table' and found a couple. Here's one that is pretty close: https://community.esri.com/t5/arcgis-pro-questions/arcade-update-feature-class-based-on-related-table/td-p/662674 take a look here too: https://github.com/Esri/arcade-expressions It might have just what you need. @XanderBakker @HusseinNasser2
... View more
01-26-2021
08:21 AM
|
2
|
0
|
3293
|
|
POST
|
Bringing @ChrisFox into this discussion. You might want to turn off all the rules and then turn them back on one at a time to see which one fails. That might give you an idea where to look.
... View more
01-25-2021
12:58 PM
|
0
|
0
|
7919
|
|
POST
|
Here is my basic approach to using a dictionary and an update cursor: import arcpy
target = r'C:\path\to\the\table_to\update'
upDateFields = ['CommonKey', 'FieldN']
source = r'C:\path\to\the\data_that_has\what_target_needs'
sourceFields = ['CommonKey', 'Field1']
sourceDict = {r[0]:(r[1]) for r in arcpy.da.SearchCursor(source,sourceFields)}
with arcpy.da.UpdateCursor(target,updateFields) as updateRows:
for updateRow in updateRows:
keyValue = updateRow[0]
if keyValue in sourceDict :
updateRow[1] = sourceDict[keyValue]
updateRows.updateRow(updateRow)
else:
pass Having poured through the script for a minute or two, it seems like you are over thinking it a bit. Not a criticism, just an observation. The basic premise is to create a dictionary of the source data using the common key between the source and the target as the key in the dictionary, and then the associated value in that dictionary is what the target gets updated with. Lets say the common key between the source and the target is a field called FacilityID . Using dictionary comprehension create a the dictionary with a search cursor as shown above and it looks something like this: {1:'value1',
2:'value2',
3:'value3'} All you need to do then is look and see if the dictionary key appears in the target, and then used the associated value with that key to update the target field. A row in a search cursor or update cursor is in the format of a tuple so the first element is row[0]. Make sense?
... View more
01-25-2021
09:15 AM
|
0
|
0
|
1325
|
|
POST
|
Post your code rather than attaching a zip file: click on the three dots to expand the menu tool bar, select the </> icon (insert code) and choose python. That way several sets of eyes can take a look at it...
... View more
01-25-2021
08:08 AM
|
0
|
0
|
1327
|
|
POST
|
Why not use Table to Excel on the selected records so you don't have to rely on copy and paste?
... View more
01-22-2021
12:44 PM
|
3
|
1
|
3627
|
|
POST
|
I might have to; not sure what my pension is gonna look like!
... View more
01-22-2021
08:19 AM
|
0
|
0
|
1668
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-11-2018 07:12 AM | |
| 1 | 05-17-2021 11:18 AM | |
| 1 | 06-29-2021 11:42 AM | |
| 1 | 07-05-2012 07:49 AM | |
| 1 | 09-03-2016 06:16 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-19-2026
11:56 AM
|