Select to view content in your preferred language

Expected behavior for default subtypes for a geodatabase feature class?

1433
4
11-01-2022 08:53 AM
VinceE
by
Frequent Contributor

The behavior of setting default subtypes for a geodatabase feature class appears inconsistent. When adding codes manually in the subtypes table, it appears that the first code added automatically becomes the default, which can then be changed as new codes are added.

Initial subtype automatically becomes the default.Initial subtype automatically becomes the default.

Default can be changed, but not removed.Default can be changed, but not removed.

However, when using the geoprocessing tools "Set Subtype Field" followed by "Add Subtype" to do the same thing, a default subtype is not automatically applied. The outcome of using the toolbox interface or ArcPy seems the same.

No default subtype automatically applied.No default subtype automatically applied.

Then, once a default subtype is chosen, either using the "Manage Subtypes" window OR the "Set Default Subtype" tool (the GUI or ArcPy), it can't be removed without completely clearing the subtype and starting over (unless there is a "Remove Default" that I cannot find).

My question is, "why?" If a feature class can seemingly exist without a default subtype defined, why can't an existing default be removed? Why does the "Manage Subtypes" window automatically assign one, while the geoprocessing tool does not? What is the expected behavior here, and perhaps also, what is best practice?

Tags (3)
0 Kudos
4 Replies
RhettZufelt
MVP Notable Contributor

Not to hijack, but in trying to figure out an answer, I ended up with questions instead.

In ArcMap/Catalog you could set the default subtype, then use that to update the values of the other subtypes with the "use Default" button.  Other than that, I have not seen any value/use of the Default subtype.

Since this feature doesn't seem to be in Pro, (unless, like a lot of things, it is "hidden" well now), I am at a loss as to what the Default subtype is even used for.  New subtypes don't take on the default value, so what is the purpose of setting a particular subtype as default?  Am I missing something here?  Fully understand the utility in setting default value(s) for subtype(s), but still not sure what the Default subtype means anymore.

Perhaps that is why it is inconsistant between tools as there is no use for it now anyway?

Thanks,

R_

0 Kudos
VinceE
by
Frequent Contributor

Thanks for adding to the discussion. Seems to me that if I "Click to add a new row." at the bottom of an attribute table with subtypes defined, and then press "Enter" to confirm that new row (even without creating geometry or entering any attributes), the subtype of the feature will be whatever the default is. I guess this is potentially useful if most of my new features are of a particular subtype. Maybe it's as simple as that.

It's just weird to me how the creation of the default is implemented. And then you can't remove it. I have not used ArcMap/ArcCatalog for several years, but it sounds like maybe the implementation had greater utility in that software?

0 Kudos
RhettZufelt
MVP Notable Contributor

That makes sense.  I've never had to need to create a row in a FC without geometries, I normally just add from a template.

The only real reason I ever changed/used the default Subtype was when setting up the subtypes.  I configure all the values I want to the default subtype, then use the 'Use Default' button to copy the setting to the other subtypes as most of the values are the same.  Then I just have to modify the few values that makes the "other" subtypes different.

It appears that  in Pro to get it to use an existing subtype as a "template", each new subtype you need to actually copy/paste an existing subtype, then change the name and modify the values.  Or, just add one using the default field values for the FC, then modify all field values that are different.  Almost takes more time to set up subtypes now than I gain from the utility of having them.

R_

0 Kudos
VinceE
by
Frequent Contributor

Ah, I see, that makes sense. Thanks again for sharing your experience with them, very helpful.

0 Kudos