Available with Network Analyst license.
"ERROR 000192: Invalid value for Sub layer" occurs when you try to run the Add Locations tool, but the value entered in the Sub layer parameter doesn't exist (or was misspelled). Resolving the issue is normally a matter of reentering the parameter value with the correct name of the sublayer. However, error 000192 can also be encountered when you try to run a geoprocessing model that was originally created using a foreign-language version of ArcGIS.
What often happens is the geoprocessing model that was created in a foreign language calls a tool to make an analysis layer and then calls Add Locations to populate the analysis layer with network analysis objects. Since the model was created in a foreign-language version of ArcGIS, the Add Locations tool is expecting sublayers with names in that foreign language. However, when the model is run in another language version of ArcGIS, the output sublayers are given translated names to match the language of the current ArcGIS application. This causes Error 000192.
For example, someone using an English-language version of ArcGIS creates a geoprocessing model that makes a route analysis layer, loads stops, and solves the route. The model calls three geoprocessing tools: Make Route Layer, Add Locations, and Solve.
The Make Route Layer tool defines the names of the output route analysis layer, and consequently its sublayers (Stops, Routes, Point Barriers, and so on), in English. The Add Locations tool is set up to load network locations into a sublayer named Stops. The model works error free in any English-language version of ArcGIS. However, when it runs in a Spanish-language version of ArcGIS, the Make Route Layer tool generates the route analysis layer and its various sublayers with Spanish names: Paradas instead of Stops, Rutas instead of Routes, and so on. The Add Locations tool, therefore, can't find "Stops" and throws error 000192.
Resolving the error
The way to avoid or resolve the error is to edit the geoprocessing model and expose the sub_layer parameter of the Add Locations tool as a model parameter. The graphic below illustrates what this would look like in ModelBuilder.The following steps describe how to accomplish this:
In the Catalog window of ArcMap, right-click the geoprocessing model
that is generating the error and choose Edit.
The ModelBuilder dialog box opens.
- Right-click the Add Locations tool in the model diagram and choose Make Variable > From Parameter > Sub layer.
A parameter is added to the diagram and linked to the Add Locations tool.
- Right-click the newly added parameter in the diagram and choose Model Parameter.
An uppercase P is added in the model diagram near the parameter. The P indicates the parameter will be exposed as a parameter in the tool dialog box.
- Repeat the previous two steps for any other Add Locations tools used in the model.
- Close the ModelBuilder dialog box.
The Save Model dialog box appears.
- Click Yes to save your changes.
When you subsequently run the geoprocessing model, the model's dialog box shows a Sub layer parameter as a drop-down list. (If there were multiple Add Locations tools in the model, multiple Sub layer parameters are shown.)
If the model was originally created using a foreign-language version of ArcGIS, the name of the chosen sublayer in the drop-down list is displayed in the foreign language. Also, an error icon appears next to the model parameter. Click the drop-down list and choose the translated name of that sublayer. For instance, if you are using a Spanish-language version of ArcMap and have a model that was created using an English-language version of ArcMap, the Sub layer drop-down list would display Stops (in English). You would need to choose Paradas (in Spanish) instead.