1

I have a File Geodatabase from an external source that has a number of layers. I need to crosswalk this data to our own data model so some or part of it can be imported into our own database.

To do this, I want to first create a "field map" in Excel that has a separate tab for each of their layer attribute tables that lists their field name, the field data type (long, text, double, etc.), and the field length. I will then add a column and use that to populate which of our own fields are most equivalent for each one (if any).

This would be much faster if there was a way to export just the field names and their properties for each layer from ArcMap as a table - does anyone know if that's possible?

Right now I'm just exporting one data record for each table, opening that in Excel, then copying the field names row and pasting it as a "transpose" to turn it into a vertical list. I then would have to look up each field one-by-one in the layer properties window and manually enter in the field type and length for each one. There will probably be well over 100 fields though, so this is going to be a pain doing it that way.

3

I also need to create such reports fairly often, so I have written a Python package which you can install and use to generate an interactive HTML report out of your geodatabase. Look at its GitHub page here for details.

If you are not willing to learn a bit about using Python tools, look at this GIS.SE answer: Creating table containing all filenames (and possibly metadata) in File Geodatabase?, you will be able to generate a nice .csv file with all your data which you can easily open in Excel.

If you have access to ArcGIS 10.1/10.2 installation, you could also use ArcGIS Diagrammer which is capable of producing a fairly complete HTML report about the items in your geodatabase.

2

Using arcpy/python (within ArcCatalog or ArcMap python console) would be one way to do this. This example creates a comma separted text file including some basic field properties which may be brought into Excel as a comma delimited text, here is a general example:

fc = 'C:/Temp/myTest.gdb/test' # target fc
fields = arcpy.ListFields(fc)
file = open('C:/Temp/fieldInfo.txt', 'w') # create and open a writable text file
file.write('Name,Type,Length\n') # write header names
for field in fields:
    file.write('{},{},{}\n'.format(field.name,field.type,field.length))
file.close()

You could build off of this to use arcpy to loop through all fc in a gdb for more batch processing. There are other python models that deal more directly with Excel (like XlsxWriter) which you may use to create sheets..etc.

2

The Esri Code Sharing website has a wealth of tools created by the user community, free to download. The obvious one is X-Ray for ArcCatalog. This will generate the information you need and much more, so no need to write any code. There are short videos you can watch to see how to use this AddIn.

Get into the habit of checking that website as there are many tools, you won't be the first person to have needed the functionality you require!

  • Thanks, this tool looks fantastic; I'm going to try it out. I sort of got out of the habit of checking the new site once ArcScripts got mothballed. – Jason M Aug 11 '17 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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