2

I am using the "Feature Class to Feature Class" tool to copy a feature class from an enterprise geodatabase to file geodatabase, but I would like to strip the output feature class (and its geodatabase) of all related domains and descriptions. I would like the attributes of the destination feature class to only contain the actual codes, not the descriptions.

I acknowledge that this behavior can be accomplished by exporting to a shapefile with the right environment settings, but I am not interested in using this method because of other factors (for example: truncation of field name lengths).

I know that my question is similar to Using CopyFeatures_management without copying source GDB domains to 'in_memory' workspace?, except I'm not dealing with an in-memory feature class, so I suspect there might be different answers possible.

I'm ideally looking for a solution that simply drops the domains upon export. If that's not possible, I might be interested in a solution that uses python code to remove/delete domains after the destination feature class is already in-place, but there are a lot of domains and fields utilizing them, and I haven't seen any nice tidy code that

  1. Identifies and lists feature classes and fields utilizing domains
  2. Disassociates the fields from the domains
  3. Lists all of the domains
  4. Deletes the domains

Is there a simpler way to do this, that I'm not thinking of?

0

1 Answer 1

1

I think you are going to have copy the feature class then retrospectively remove the domain from the field and the workspace. You can review the tools that will achieve this by looking at An overview of the Domains toolset page.

You could try to automate this through ModelBuilder but I suspect in your case you will have better control over the looping you will need to do using Python. If you review the appropriate tools help pages there are sample codes that practically do it for you, you just need to adapt it to your file structure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.