[GIS] In-line variable %Name% problem in Model Builder

arcgis-desktoperrormodelmodelbuildernaming conventions

Having a problem with the inline variable structure of %Name%. Attached is my model builder program. I want to be able to take the Name of the file (which is produced as a variable in the iterate raster loop) and use it to name the final output of the model. The main idea is that I want to retain the final name. The naming structure within my work space is the date on which the raster was made (satellite imagery). I wrote a few batch files to eliminate erroneous characters in the file name leaving a YYYYMMDD schema. I want to be able to insert the final work space of rasters into a raster catalog in order to show time (using the Name as the temporal discriminator). I just need to name the final output like the input file.

enter image description here

When I use the output name E:\ArcGIS\GIS_Data\Kuwait_Clipped_Normalized.gdb\%Name% I get an error.

error

Not sure why I can not reference %Name% as the file name as the Reclass by Table output.

I have even tried a few other options, but they did not work. I used the Parse Path on the Raster output and referenced %Value% as the file name (instead of %Name%). I also calculated a field as well, with no success.

Or, Is there a way I can carry over the file name attribute with the raster? I just need to retain the file name variable to preserve the time series.

Best Answer

Geodatabase feature class (and raster, etc.) naming rules:

  • Names must begin with a letter, not a number or special character such as an asterisk (*) or percent sign (%).
  • Names should not contain spaces. If you have a two-part name for your table or feature class, connect the words with an underscore (_), for example, garbage_routes.
  • Names should not contain reserved words, such as select or add. Consult your DBMS documentation for additional reserved words.
  • The length of feature class and table names depends on the underlying database. The maximum name length for file geodatabase feature classes is 160 characters. Be sure to consult your DBMS documentation for maximum name lengths.

Source

Related Question