Select to view content in your preferred language

Batch remove multiple domains from FC

483
4
09-19-2024 07:04 AM
Status: Open
Labels (1)
Bud
by
Esteemed Contributor

ArcGIS Pro 2.9.5; mobile geodatabase:

I have a feature class that has dozens of domains. I want to remove most of the domains from the FC.

Instead of manually choosing the blank option from the domain picklist for each applicable field in the Fields View, I want to batch-remove multiple domains using a single action, such as a window with a list of field domains and checkboxes.

Bud_0-1726754434531.png

 

 

4 Comments
MarceloMarques

@Bud, you can accomplish this via a Python arcpy script. You can download my Pro ArcToolbox from this link gdb_tools_pro_2023_11_03.zip.  I hope this helps.

SSWoodward

Thanks for the Idea @Bud 

Cell operations like this aren't currently supported with multiselect in any of the design view UI's.  There are a few other Ideas related to this type of functionality eg. Changing all domain split policies at once

A quick way to to do this be in the python window.  This also lets you remove domains from specific subtypes as well using the subtype parameter of the Remove Domain from Field GP tool 

in_table = r"c:\temp\temp.gdb\class"

for field in arcpy.ListFields(in_table):
    arcpy.management.RemoveDomainFromField(in_table, field.name)




Bud
by

Thanks @SSWoodward.

Cell operations like this aren't currently supported with multiselect in any of the design view UI's.

Is there a reason we can select multiple fields (row headers) in the Fields View and delete the fields, but we can't select multiple fields and remove the domain? Those two operations seem similar.

SSWoodward

Deleting a row is a row operation, but changing the values of specific cells in the selected rows is a cell operation.  Cell operations aren't supported with multiselect in the data design views.