Feature class not visible in geodatabase after running Alter Field in ModelBuilder

578
1
11-03-2020 03:58 AM
Matt-Goodman
Occasional Contributor

I'm using ModelBuilder in ArcGIS Desktop 10.5.1.

I have a simple model that clips and exports three feature classes, each to their own file geodatabase (law, fire, and ems). The model branches for the fire and ems feature classes both end by using the "Alter Field" to change the name of the field. The law feature class does not require this field name change. The model executes without any errors, warnings, or other messages. But, when I look at the two geodatabases for fire and ems, they appear to be empty (in ArcCatalog). The strange thing is, if I browse into the geodatabases in Windows Explorer, I can see all the of the system tables and I can confirm that they contain the feature classes (by name) that the model created. To pinpoint the issue, I re-ran the same model, but without the last step (Alter Field), and the feature class appears in the geodatabase as-expected.

Below is a clip of a branch of the model:

enter image description here

Below is a clip of the two geodatabases appearing to be empty, even after numerous refreshes within ArcCatalog (I even tried closing an re-launching all ArcGIS sessions):

enter image description here

And below is a view of the apparently empty geodatabases viewed through Windows Explorer, and a system table open in Notepad showing the feature class name highlighted (emsFC):

enter image description here

0 Kudos
1 Reply
curtvprice
MVP Esteemed Contributor

ModelBuilder validates (ie verifies inputs against tools before anything is run, so if the tools run don't happen to update the layer schema within the model, you are out of luck.

The only way to avoid this problem is to run the Alter tool inside a python script inside a Calculate Value tool. This will bypass the ModelBuilder parameter validation, the Alter tool will just run if the inputs are valid.

0 Kudos