Trouble Adding Fields to Feature Classes using X-Ray

3266
6
07-16-2013 09:22 AM
Labels (1)
LaurenVoelker1
New Contributor
Hello!

I am having difficulty adding additional fields to feature classes in the LocalGovernment.gdb.  I need to add several fields to several different feature class in multiple datasets. I am currently just concentrating on one, so that I can make sure i have a viable workflow for the others, but no matter which route I take, I seem to be stuck. 

I do not want to add individual fields to the various feature classes in ArcCatalog.  I have tried using Safe Software's FME - doesn't support addition of fields in feature classes for .gdb.

Lately, I have been using XRay and attempting to manipulate the LocalGovernment.xml in Excel; saving it; and then importing the schema into an empty LocalGovernment.gdb.  the fields I add and save to the .xml do not come into the newly populated .gdb.  I also commonly get the following error "XML Import Error:Exception from HRESULT: 0x80043066" which may have something to do with editing the xml? 

Does anyone have any suggestions? Thank you for your time!

Lauren
0 Kudos
6 Replies
LaurenVoelker1
New Contributor
I have figured this out.  The solution made me feel like an amateur.

When editing the LocalGovernment.xml in Excel, Copy and Paste the values you would like for the additional fields (Type, AliasName, DomainName, DefaultValue, IsNullable, Precision, Scale, Required, DomainFixed) you are introducing into the model from existing values in the .xml.  Something in the background did not allow me type my own values, you must choose from those already existing within the model.
0 Kudos
JonathanCusick
New Contributor II
How were you able to get to edit the xml in Excel?

I tried to use Edit>Datasets from the X-Ray dropdown menu, but the option (along with all the other choices in Edit) are grayed out. I just wanted to add some more attribute fields to the LocalGovernment.gdb files so that I can bring in all of the attributes that my existing data had previously. Thanks
0 Kudos
AndresCastillo
MVP Regular Contributor

Hi, I am also having trouble getting access to the grayed out options....did you find any solution, other than what Lauren said?

I was only able to open the xml in the xml editor.

0 Kudos
LaurenVoelker1
New Contributor
I always try to make sure that the XML and geodatabase I am working with are visible in their respective parameters on the X-Ray window.  To Edit the XML, you must first Open the XML.  You can use the dropdown, X-Ray -> Open XML Workspace, or the �??Open Selected XML Workspace document�?� Icon.   After the XML is open you should be able to Edit -> Datasets and this will open the XML in Excel.  Remember to save your changes to the xml. 🙂  Hope this helps!

Lauren
0 Kudos
JonathanCusick
New Contributor II
Thanks Lauren! I'm able to get into Excel and add attribute fields, but now am coming across your same problem from above. I made sure that everything in my new attributes were formatted the same as the existing attributes (ie. they all contain Type, AliasName, DomainName, etc. fields). However, some of the information for my new attributes are unique to themselves so I can't copy and paste those values from the existing attribute records.  Were you able to figure out a further workaround or did your first solution meet your needs?
0 Kudos
LaurenVoelker1
New Contributor
I noticed a couple things, and I hope this will work for the information you need to add.

After inserting a row, I copied and pasted existing Field Properties for each new field I wished to add. The Field Property information I copied was either in the worksheet I was currently working in, or in a different worksheet in the model.  However, I was able to change some pasted values for certain field properties, in which I wished to add my own information.

Field Properties in which I copied and pasted the exact value I needed: Type, IsNullable

For the other Field Properties, I copied and pasted existing values to act as placeholders and then entered my own information (if it needed to be changed).

I wanted to make sure that when I inserted a row and populated it, the cells were formatted to the xml, which I why I copied and pasted all the information (as a placeholder) and then went back to change certain things.

Lauren
0 Kudos