|
IDEA
|
I would like to be able to use a database connection to get workspace properties from Describe. Using Pro 3.1.3, accessing any of the workspace properties everything results in OSError: "CIMDATA=<CIMStandardDataConnection xsi:type=...rest of connection string" does not exist If I'm building paths to layers and tables in a script, I sometimes use Describe to get workspace information from one layer to build another. It's also helpful in debugging. Here's a question discussion for reference.
... View more
04-30-2024
07:27 AM
|
0
|
8
|
2949
|
|
POST
|
In this case, since you are pointing at a layer input by the user, I would suggest that the user have the database connection pointed to the correct version when it's input. If not, you could either create a new database connection (or connection string) pointed to the version you want. Or you can try useing Change Version.
... View more
04-30-2024
07:09 AM
|
0
|
2
|
1597
|
|
POST
|
I'm testing out the new arcpy.management.CreateDatabaseConnectionString() with a connection to a 10.8.1 enterprise geodatabase in Oracle, but I can't seem to get any workspace properties from Describe. Everything results in OSError: "CIMDATA=<CIMStandardDataConnection xsi:type=...rest of connection string" does not exist If I create the connection with an object_name and schema so it points to a feature class, I can get layer properties from Describe and use things like ListFields(). So I know it can make some kind of usable connection. When testing, I'm only specifying database_platform, instance, username, and password. Is there something I'm doing wrong?
... View more
04-29-2024
04:09 PM
|
0
|
2
|
1371
|
|
POST
|
Does the order of these values matter after you remove duplicates?
... View more
04-29-2024
07:50 AM
|
0
|
0
|
1239
|
|
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
|
2823
|
|
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
|
2840
|
|
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
|
1377
|
|
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
|
1377
|
|
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
|
3132
|
|
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
|
3138
|
|
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
|
2188
|
|
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
|
2199
|
|
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
|
2212
|
|
POST
|
Try Generate Near Table and specify the closest_count parameter as 2
... View more
04-19-2024
11:34 AM
|
0
|
0
|
2056
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a week ago | |
| 1 | 10-23-2025 03:53 PM | |
| 1 | 04-28-2026 07:25 AM | |
| 1 | 03-19-2026 08:59 AM | |
| 1 | 02-12-2026 01:37 PM |