|
IDEA
|
Thank you so much for sending those screenshots! Seeing your Pole layer results clears up the entire disconnect instantly. You are completely right—using the unified parent feature class layer directly is the standard way to load the data, which is why your script is working flawlessly. On a completely unrestricted layer, the high-level ArcPy setter serializes perfectly, and the CIM classes property evaluates the data and populates the rows exactly as your screenshot shows. The reason our two worlds aren't lining up comes down to one critical layer configuration: Definition Queries. To support our field crews' operational understanding, we split that single, unified parent layer out into multiple distinct map layers, assigning each one a specific Definition Query to isolate asset types (e.g., filtering the parent device layer to show only Fire Hydrants via an ASSETGROUP SQL statement). The Core Bug Exposed: When a feature layer has an active Definition Query applied to it, attempting to change or initialize a multi-field unique value renderer via the high-level API (sym.renderer.fields = ['ASSETGROUP', 'ASSETTYPE']) fails to serialize properly in memory. ArcGIS Pro updates the text fields in the Symbology UI pane, but the background data provider sandboxes the change as a volatile local cache. Because of the active SQL filter query, the application fails to serialize those new classes down into the actual layer definition object in map memory. On a layer with an active definition query: getattr(first_group, 'classes', []) returns a length of 0. The Table of Contents remains empty, and the unique value grid stays blank. The rows are trapped in a memory dead-zone until a user manually clicks "Add All Values" in the UI pane to force the database scan. How to Easily Reproduce This on Your End: You don't need our data or any water models to see this! You can replicate this exact behavior right now using your existing Pole layer: Open your map properties and apply a standard Definition Query to your Pole layer (e.g., ASSETGROUP = <Some_Integer_Code>). Ensure the primary symbology is set to Unique Values. Run your field-switching script to assign ['ASSETGROUP', 'ASSETTYPE']. You will instantly see the bug manifest: the UI pane text fields will change, but the underlying classes array will suddenly return a stubborn 0 rows because the definition query constraint blocks the automated script serialization. Let me know if you require more information. Luke
... View more
Friday
|
0
|
0
|
47
|
|
IDEA
|
@JeffBarrette Thank you for the suggestion regarding the property names. To confirm, in the ArcGIS Pro CIM V3 Specification, a CIMUniqueValueGroup object explicitly uses the attribute items (which contains an array of CIMUniqueValueClass objects). There is no .classes attribute on the group container in the V3 schema. To verify this definitively, we tested both properties in the ArcGIS Pro 3.x Python window. As expected, targeting .classes fails and returns an empty fallback list, while targeting .items is syntactically correct but returns 0 items due to the UI-to-CIM cache isolation bug. Here is the debugging proof using standard Python reflection (dir()): import arcpy
layer_name = "Water Device - Fire Hydrant"
aprx = arcpy.mp.ArcGISProject("CURRENT")
active_map = aprx.activeMap
layer = active_map.listLayers(layer_name)[0]
cim_def = layer.getDefinition('V3')
uv_renderer = cim_def.renderer
if hasattr(uv_renderer, 'groups') and len(uv_renderer.groups) > 0:
first_group = uv_renderer.groups[0]
# Reflecting properties on the group container
group_attributes = dir(first_group)
print(f"Contains 'items'? {'items' in group_attributes}") # Returns: True
print(f"Contains 'classes'? {'classes' in group_attributes}") # Returns: False
# Checking the actual length of the valid 'items' array
print(f"Actual items count: {len(getattr(first_group, 'items', []))}") # Returns: 0
... View more
a week ago
|
0
|
0
|
167
|
|
IDEA
|
Answer To Questions: How is the script running? The behavior has been reproduced both as a standalone script execution inside the built-in ArcGIS Pro Python Window and when wrapped natively inside an ArcGIS Python Toolbox (.pyt) script tool running within the application context. Does the script modify the underlying data just prior to trying to change the renderer? Have you tried arcpy.RefreshLayer()? No, the script does not modify any underlying database records or schema tables prior to editing the symbology; it is purely attempting to alter the layer's visual properties in map memory. Have you tried arcpy.RefreshLayer()? Yes, arcpy.RefreshLayer() and a hard canvas toggle (layer.visible = False then True) were both tested. Neither resolves the structural problem. The issue is not a canvas redraw failure; it is a serialization/validation lock inside the application's C++ data provider thread. Would it be helpful if you had an additional isSubtypeGroupLayer Layer property? Yes, exposing isSubtypeGroupLayer and an explicit isSubtypeSublayer boolean property would be incredibly helpful for defensive scripting. However, the root requirement is allowing the ArcPy/CIM pipeline to successfully serialize and commit unique value combinations to these sublayers without the application sandboxing the edits or throwing a UI crash. Description of Technical Issue: When interacting with an out-of-the-box Utility Network subtype sublayer, attempting to programmatic convert or apply a multi-field UniqueValueRenderer (specifically targeting ASSETGROUP and ASSETTYPE) fails to serialize into the active map document. The Volatile UI Cache Lockout: If a user programmatically applies the multi-field renderer configuration via sym.renderer.fields = ['ASSETGROUP', 'ASSETTYPE'], the high-level Symbology pane updates visually. However, if the script immediately calls l.getDefinition('V3'), the underlying CIMUniqueValueRenderer.groups array returns an empty list (0 rows). The Glitch: The application evaluates the generated rows as a volatile visual cache isolated within the UI pane thread. Because they are not serialized down into the actual layer definition object, Python cannot access, manipulate, or map style items to those specific rows via code. The Crash Trigger: If a developer attempts to bypass this by instantiating a clean arcpy.cim.CIMUniqueValueRenderer() and injecting it onto the sublayer to force the rows to generate, ArcGIS Pro hard-crashes. This happens because replacing the root renderer object completely strips out the deep, hidden GlobalID pointers, subtype domains, and network association rules natively embedded in the UN sublayer's background XML schema. Testing Script: To demonstrate this behavior on any standard ArcGIS Solutions Utility Network layer (set to Unique Values in the UI), run the attached snippet. It illustrates how the UI and the CIM completely decouple, trapping the generated rows in a memory dead-zone: import arcpy
# Target any standard ArcGIS Solutions UN sublayer currently using Unique Values
layer_name = "Water Device - Fire Hydrant"
aprx = arcpy.mp.ArcGISProject("CURRENT")
active_map = aprx.activeMap
layer = active_map.listLayers(layer_name)[0]
# 1. Attempt standard high-level multi-field assignment
sym = layer.symbology
sym.renderer.fields = ['ASSETGROUP', 'ASSETTYPE']
layer.symbology = sym # The UI pane now visually shows the fields assigned
# 2. Immediately inspect the low-level CIM definition to modify the newly generated rows
cim_def = layer.getDefinition('V3')
uv_renderer = cim_def.renderer
# BUG: This will print 'Found 0 active rows' even though rows are generated/visible in the UI pane!
if hasattr(uv_renderer, 'groups') and len(uv_renderer.groups) > 0:
active_items = getattr(uv_renderer.groups[0], 'items', [])
print(f"Success: Found {len(active_items)} rows available for style mapping.")
else:
print("BUG DETECTED: Found 0 active rows in the CIM rendering list. The data provider has sandboxed the rows.")
... View more
2 weeks ago
|
0
|
0
|
258
|
|
IDEA
|
Currently, when working with heavily managed Utility Network (UN) datasets, enterprise administrators cannot scale or automate map production using Python scripts. Subtype Group Layer sublayers isolate their rendering pipeline from the standard ArcPy/CIM environment. When attempting to programmatic change symbols on a Subtype Feature Layer using standard workflows (e.g., layer.symbology or low-level layer.getDefinition('V3')), the application either silently drops the edits, throws an attribute error, or corrupts the internal XML schema validation, throwing a "Requested operation could not be completed" banner and rendering a blank white square in the UI. Even using CIMREGISTRY pointers on dynamically generated CIMUniqueValueClass entries fails because the UI-cached values are hidden from the active layer definition matrix until manually committed via mouse clicks in the Symbology pane. Proposed Solution / API Extension Extend the ArcGIS Pro arcpy.mp or arcpy.cim module to natively support schema-aware unique value mapping on Utility Network sublayers. Specifically: Provide a stable high-level method such as UniqueValueRenderer.addValueCombination([field1, field2], style_item_name) that forces serialization straight into the core map document. Allow Symbol.applyStyleItem() or an equivalent property-setter to interact with read-only subtype symbol objects when a valid style sheet is actively imported into the project items framework.
... View more
3 weeks ago
|
2
|
6
|
426
|
|
IDEA
|
Need a way to edit and change location of data for Geolocators.
... View more
04-02-2026
09:33 AM
|
0
|
0
|
180
|
|
IDEA
|
@MelissaJarman - I updated the title. Is that what you were referring to? Sorry for the delay. I had to consolidate my user profile.
... View more
12-02-2025
08:08 AM
|
0
|
0
|
1070
|
|
IDEA
|
Add a way to add in an expression at the field level for each layer within a hosted feature service. This way, the expression doesn't need to be added to each webmap/form. This expression would carry over from the hosted feature service layer and added to the form automatically as well as any popup.
... View more
10-15-2024
12:36 PM
|
0
|
0
|
515
|
|
IDEA
|
Arcade Templates would be awesome where its portable so you could share custom popups and more.
... View more
08-21-2024
08:24 AM
|
0
|
0
|
1618
|
|
IDEA
|
When publishing and missing a related table or layer, there are no layers or tables identified as missing. This is helpful to understand when there are a ton of relationships added to each layer within a feature service before publishing.
... View more
06-05-2024
07:52 AM
|
0
|
1
|
923
|
|
IDEA
|
Yes but more interactive like xray for ArcGIS Desktop. Capable of handling Utility Network, LRS and Indoors logic as well. If I want to update existing geodatabases, xray had that ability in a more dynamic way. I didn't know if that was in the plans for the future.
... View more
05-10-2024
08:07 AM
|
0
|
0
|
3432
|
|
IDEA
|
@KoryKramer Will we see a contextual menu of these tools in Pro in the future?
... View more
05-10-2024
08:01 AM
|
0
|
0
|
3438
|
|
IDEA
|
@HannesZiegler There is no way to programmatically or through a batch process update existing sde connection files for the additional properties. In fact, there is no geoprocessing tool to do this. Each connection needs to be manually updated. For medium to large organizations that have many sde connections, this is a problem. The industry is now leaning towards encrypting database instances via tls connections. Once this is done for the GIS person who manages the enterprise geodatabase stack, it is very costly and time consuming. Below is a screenshot of what is added in order to work. Does this help answer your question?
... View more
04-16-2024
10:50 AM
|
0
|
0
|
2625
|
|
IDEA
|
Fixed code highlighting. If anyone has questions, please let me know.
... View more
04-12-2024
10:41 AM
|
0
|
0
|
2688
|
|
IDEA
|
####Update SDE Files using TLS Security for SQL Server
import os
import operator
import arcpy
dbloc = r"D:\MapsandGeodatabases\dbconnects/"
dblist = os.listdir(dbloc)
dblocnew=r"D:\MapsandGeodatabases\newdbconnects/"
user='xxx'
passw='xxx'
for dbl in dblist:
if '.sde' in dbl:
try:
desc = arcpy.Describe(dbloc + dbl)
cp = desc.connectionProperties
cpdb = cp.database
inst = cp.instance[+14:]
enco = ";Encrypt=yes;TrustServerCertificate=yes"
arcpy.management.CreateDatabaseConnection(
out_folder_path=dblocnew,
out_name=dbl,
database_platform="SQL_SERVER",
instance=inst+enco,
account_authentication="DATABASE_AUTH",
username=user,
password=passw,
save_user_pass="SAVE_USERNAME",
database=cpdb,
schema="",
version_type="BRANCH",
version="",
date=None,
auth_type="",
project_id="",
default_dataset="",
refresh_token='',
key_file=None,
role="",
warehouse="",
advanced_options=""
)
print(arcpy.GetMessages())
except Exception as e:
print(f"issue with sde connection file {dbl}: {str(e)}")
continue
... View more
04-10-2024
11:35 AM
|
4
|
6
|
2812
|
|
IDEA
|
@BruceHaroldCorrect me if I'm wrong, x-ray as a whole has NOT been implemented completely. One piece of the functionality has been implemented which is the reporting aspect of the database model. Changes, import, the way we can update database models such as the Utility Network, ProLRS or Indoors database models will be supported in future releases?
... View more
11-16-2023
07:42 AM
|
0
|
0
|
4081
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 3 weeks ago | |
| 4 | 04-10-2024 11:35 AM | |
| 2 | 09-13-2023 02:16 PM | |
| 1 | 07-30-2021 08:07 AM | |
| 1 | 08-16-2023 08:40 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|