Create a model to export feeder information to spreadsheets
The following steps outline a way to use the Export By Feeder tool in conjunction with Esri's Model Builder and a third-party geoprocessing tool to send Feeder Manager 2.0 data to .csv file.
The end result is a toolbox tool that you can start from ArcMap or ArcCatalog. When you open it, you must specify an output location for the .csv files. When you click OK, the model runs and generates the files.
Though Schneider Electric successfully tested this process, we cannot support GP tools that we do not own. Visit this page to access Esri's Analysis and Geoprocessing Tool Gallery.
Here is example of the model built by Esri's geoprocessing tool:
- Follow the steps above to add the Export By Feeder geoprocessing tool to a new toolbox in ArcMap or ArcCatalog.
- Click Geoprocessing > ModelBuilder.
- Add the Export By Feeder tool to the model:
- Drag the Export By Feeder tool from the ArcToolbox to the Model window.
- Double-click Export By Feeder box.
- In the Export By Feeder window, click the folder under Input Geometric Network.
- Locate a geometric network and click Add.
- Use the Input Feeder ID menu to select one or more of the feeders that belong to that geometric network. These are the feeders whose data you want exported.
- In the Output Database field, type in_memory.
- If you want to specify a prefix for each of the tables or feature classes (and the .csv files they will populate) generated by this tool, enter it in the Table Prefix field. A table prefix is mandatory if you plan to run your model via a python script.
- If you want to export each feature class without its spatial data, check Export As a Table.
- Click OK.
- Add an iterator to the model:
- Right-click a blank area in the Model window and select Iterators > Feature Classes.
- Select the Connect button on the Model window's toolbar.
- Click the green in_memory oval and then the Iterate Feature Classes hexagon to connect them.
- Select Workspace of Feature Dataset from the menu that appears.
- The green output of the Iterate Feature Classes hexagon may be labeled with one of your feature class names, or be named something other than FeatureClass. If so, right-click that green oval and select Rename. Rename it to FeatureClass, for the sake of better understanding this model in the future.
- Add the Table to Excel script to the toolbox and the model:
- Visit this page to access Esri's Analysis and Geoprocessing Tool Gallery and extract the tool you need.
- Right-click the ArcToolbox at the top of the ArcToolbox pane and select Add Toolbox.
- Locate the Additional Conversion - Generic Tools.tbx, from the location to which you extracted it.
- Expand that toolbox in the ArcToolbox pane and drag the Table to Excel tool to the Model window.
- Double-click the Output File oval of the Table to Excel script you just added to the Model window.
- In the Output File field, type %OutputLocation%\%Name%.csv. Click OK.
- Use the Model Builder's Connect tool to connect the Feature Class Oval (an output of the Iterate Feature Classes hexagon) to the Table to Excel box.
- Select Input Table from the menu that appears.
- Add an output location parameter. This will be the location
of the exported .csv files.
- Right-click a blank area in the Model window and select Create Variable.
- Select String from the list and click OK.
- Right-click the String oval in the Model window and select Rename.
- Rename it to OutputLocation.
- Right-click that OutputLocation oval and select Model Parameter.
- Save the model:
- In the Model window, click Model > Save As.
- Navigate to your database.
- Select and existing toolbox or click the New Toolbox button. The toolbox is a place to store your models.
- Double click the toolbox.
- Name your model and click Save.