I feel like I'm having a GIS brain fart where I can't remember how to do this easily.
There is a certain 'schema' I use for a set of feature classes (like number of fields, the field names, field types, and some domains) that I want to 'copy' into a brand new feature class. This new feature class only has features that were imported from CAD. What's the best way about turning my newly created feature class into a shell of what I want it to be? Does that make sense?
ArcGIS Pro 2.1.3
Solved! Go to Solution.
Well, that sounds like good fun! I appreciate your help and look forward to 2.2.
Hi Jonathan,
I am trying to do the same as Adrian above (In Arc Map 10.5) and I can import the schema to a new feature class and it works fine, I can get all the fields because I exported the xml workspace from a previous geodatabase. BUT I do not get the domains as Melinda mentions below. I exported schema only. Is there a step I missed? I'd like to import all the domains I created as well as the fields for a new geodatabase
Hi Siran,
I'm not sure why it doesn't seem to work in your environment. I just tested this on my end using 10.6.1 and the domains were included in my import. You might try one more time?
If it still doesn't work, let us know your steps and maybe that will help. You could also contact Technical Support at 888-377-4575 if you'd like to work with someone here on it.
Ok I will do that. Thank you.
I just found out about the lack of domains coming over from the create new feature class wizard. That was not mentioned in the documentation. I figured using a field template would bring the domains in as well.
Julie,
So the template doesn’t bring in the domains? I haven’t tried it.
Siran D. Erysian, M.A., GISP,
Research Analyst II – GIS
Think Spatially
Department of Water Resources
3374 E. Shields Ave, Rm. A-1, Fresno, CA 93726 (559) 230-3312
Siran.Erysian@water.ca.gov
Not exactly 'easy' (but that's all relative, right?!) but you could create a python script that utilizes arcpy.ListFields, and then loop through that list and add fields to the existing feature class:
ListFields—ArcPy Functions | ArcGIS Desktop
Field—ArcPy classes | ArcGIS Desktop
Add Field—Data Management toolbox | ArcGIS Desktop
Oooohhh... tasty!
Next time I will try that.
Another option for creating new feature classes from an existing schema, that should retain domains, is to use the Import / Export XML Workspace tools. Try right-clicking a feature class from within the Catalog pane > Export > Feature Class(es) to XML Workspace Document. Under Export Options, you can choose 'Schema only'. To create the new empty feature class with this schema (including domains), simply right-click the geodatabase of interest from within the Catalog pane > Import > XML Workspace Document, which launches the similarly named gp tool. Select the recently created XML for the Import file and choose to 'Import schema only.'
Export XML Workspace Document—Data Management toolbox | ArcGIS Desktop
Import XML Workspace Document—Data Management toolbox | ArcGIS Desktop
Note: These are only available with a Standard or Advanced license.
Melinda,
That is very helpful! Thanks for the info on this. I will certainly try exporting/importing the XML info next time as it seems like this maybe even a more streamlined process than what's discussed above. It's good to know about the licensing as well - I appreciate you including that.
Thanks!