Select to view content in your preferred language

Push Domain/Default to All Subtypes Option

477
2
01-12-2024 09:41 AM
Status: Already Offered
Labels (1)
MErikReedAugusta
Occasional Contributor III

Quick Note:

I only explicitly mention Domains below, for simplicity, but I consider this idea to also include Default Values, since they function essentially the same way.

Problem:

Let's say you have an existing Feature Class that has some number of Subtypes enabled.  Now, you go to add a new field that has a coded value Domain, so you specify that Domain on the Fields View, and go to start editing.

Wait, why isn't my domain activating?  Oh, right: I have to go add that domain to every single Subtype manually.

If you have one or two Subtypes, this is tedious, but not an issue.  If you have a large number of Subtypes, though, this quickly becomes a big ask.

I know I could do this programmatically with Python, but interacting with Subtypes in Python is frankly a bit of a pain, itself, and I pretty much always have to burn R&D time navigating that pile of nested python dictionaries and re-teaching myself how Subtypes are stored in python before I can get around to actually doing anything with them.

Idea:

Much easier would be a button on the Subtype and/or Field View that lets you specify a Field and a Domain and populate that Domain out to that field for all defined Subtypes.

2 Comments
SSWoodward
Status changed to: Already Offered

Thanks for the idea @MErikReedAugusta 

I can see why this would be very frustrating to do manually. This functionality is accessible by using either the assign default to field or assign domain to field geoprocessing tools.

When either tool is passed a class with subtypes, users are presented with the ability to select all, or a specific set of subtypes to assign the new value to. No nested python dictionaries necessary.  If a programmatic approach is more your style, this tool in combination with list fields or list subtypes, will allow you as much flexibility as you might need. 

 

SSWoodward_0-1706213608725.png

 

 

MErikReedAugusta

Somehow I never got a notification about this, but I just noticed that @SSWoodward had replied.

Great to know that the tools are at least smart enough, but they're buried in either the toolbox list or the toolbox search.  Easy to miss, especially if you don't already know they're there!

The "manual" operation is right there in front of you and obvious, when you're looking at the Fields View.  Maybe there should be a button added to the Fields tab of the ribbon that could trigger those tools?