|
POST
|
Does the order of these values matter after you remove duplicates?
... View more
04-29-2024
07:50 AM
|
0
|
0
|
1072
|
|
POST
|
Maybe use None for the wildcard parameter instead of an empty string. df = arcpy.mapping.ListDataFrames(mxd, None)[0]
lyr = arcpy.mapping.ListLayers(mxd, None, df)[0]
... View more
04-24-2024
12:20 PM
|
0
|
4
|
2385
|
|
POST
|
I haven't done this in ArcMap, but your path doesn't look right. Try removing the two trailing back slashes.
... View more
04-24-2024
11:13 AM
|
0
|
1
|
2402
|
|
POST
|
The CIM is a weird and wonderful world. I highly recommend watching the session from the 2024 Esri Developer Summit. ArcPy: Beyond the Basics of arcpy.mp
... View more
04-24-2024
10:57 AM
|
0
|
0
|
1216
|
|
POST
|
This is possible, but only through manipulating the CIM, which is a bit tedious. Python CIM access—ArcGIS Pro | Documentation def highlightField(map, layer_name, highlight_field_name):
lyr = map.listLayers(layer_name)[0]
# Get the layer's CIM definition
cim_lyr = lyr.getDefinition("V3")
# Ensure the featureTable has fieldDescriptions to modify
# https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm#GUID-C80C9CF4-67C8-418E-BEB5-386B18EE6097
if len(cim_lyr.featureTable.fieldDescriptions) == 0:
# No CIM field descriptions class; create one.
fDesc = arcpy.cim.CreateCIMObjectFromClassName('CIMFieldDescription', 'V3')
# Get field info and populate the new field description.
highlight_field_props = [f for f in arcpy.ListFields(lyr) if f.name == highlight_field_name][0]
fDesc.alias = highlight_field_props.aliasName
fDesc.fieldName = highlight_field_props.baseName
fDesc.highlight = True
fDesc.visible = True
fDesc.searchMode = "Exact"
# Add new field description to the CIM.
cim_lyr.featureTable.fieldDescriptions.append(fDesc)
else:
# Make changes to field description in CIM.
for f in cim_lyr.featureTable.fieldDescriptions:
if f.fieldName == highlight_field_name:
f.highlight = True
# Push the CIM changes back to the layer object
lyr.setDefinition(cim_lyr)
aprx = arcpy.mp.ArcGISProject("current")
highlightField(aprx.activeMap, "MY_LAYER_NAME", "MY_FIELD_NAME") In my testing, the fieldDescriptions was indeed empty (as the documentation notes) so I created a CIMFieldDescription only for the field being highlighted. This has the effect of moving the highlighted field to the beginning of the attribute table view. If that is not acceptable, you will have to create a CIMFieldDescription for each field in the order you want.
... View more
04-24-2024
10:51 AM
|
0
|
0
|
1216
|
|
BLOG
|
Shout out to the GIS cohort in the Phoenix metro area! @MeleKoneya has inspired the City of Chandler to implement a similar solution for our Fire/Health/Medical teams during big events.
... View more
04-24-2024
08:01 AM
|
5
|
0
|
2794
|
|
POST
|
Unrelated question for you, @JakeSkinner: Do you recommend using del on a cursor even when it's used in a with statement?
... View more
04-23-2024
07:47 AM
|
0
|
0
|
2844
|
|
POST
|
If that hard coded workspace path worked fine, then it's not a problem with the database. I see you are doing some other workspace path manipulation if the input feature class is in a feature dataset. Try some other variations of the path to see if you can get it to fail when hardcoded. My guess is that you're getting something in the workspace that is causing Editor to hang.
... View more
04-22-2024
12:12 PM
|
0
|
0
|
1950
|
|
POST
|
Okay, that looks fine. Now try an isolated test with the arcpy.da.Editor() with that workspace and see what happens. workspace = 'F:\\GIS\\WORKING FILES\\TestProjects\\TestingDB.gdb'
with arcpy.da.Editor(workspace, multiuser_mode=False):
arcpy.AddMessage('starting edit')
# Nothing else, just leave the script.
... View more
04-22-2024
11:40 AM
|
1
|
2
|
1961
|
|
POST
|
Maybe something isn't right with your workspace manipulation. Try messaging out the workspace before you open the editor, then see if it works when you hard code that workspace path (or something else you know to work).
... View more
04-22-2024
11:22 AM
|
0
|
4
|
1974
|
|
POST
|
Try Generate Near Table and specify the closest_count parameter as 2
... View more
04-19-2024
11:34 AM
|
0
|
0
|
1769
|
|
POST
|
Ah, yes, sorry about that. The FeatureSharingDraft class has a code sample for publishing a layer and a table. FeatureSharingDraft—ArcGIS Pro | Documentation
... View more
04-19-2024
10:31 AM
|
1
|
1
|
1657
|
|
POST
|
Does this have the information you need? Introduction to sharing web layers—ArcGIS Pro | Documentation Share a table—ArcGIS Pro | Documentation
... View more
04-19-2024
10:03 AM
|
0
|
3
|
1702
|
|
POST
|
Yes, this workflow can be automated. However, it's not efficient to calculate the park name field in playgrounds on a regular basis. Since this is something you need to happen regularly, I recommend creating a relationship class between park and playground and utilize Attribute Rules to automatically populate the park name. This has the benefit of always being updated immediately when the data changes instead of only when you run the script.
... View more
04-19-2024
06:55 AM
|
0
|
2
|
3802
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-23-2025 03:53 PM | |
| 1 | 2 weeks ago | |
| 1 | 03-19-2026 08:59 AM | |
| 1 | 02-12-2026 01:37 PM | |
| 1 | 12-01-2025 06:19 AM |