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:

  1. Follow the steps above to add the Export By Feeder geoprocessing tool to a new toolbox in ArcMap or ArcCatalog.
  2. Click Geoprocessing > ModelBuilder.
  3. Add the Export By Feeder tool to the model:
    1. Drag the Export By Feeder tool from the ArcToolbox to the Model window.
    2. Double-click Export By Feeder box.
    3. In the Export By Feeder window, click the folder under Input Geometric Network.
    4. Locate a geometric network and click Add.
    5. 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.      
    6. In the Output Database field, type in_memory.        
    7. 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.
    8. If you want to export each feature class without its spatial data, check Export As a Table.
    9. Click OK.
  4. Add an iterator to the model:
    1. Right-click a blank area in the Model window and select Iterators > Feature Classes.
    2. Select the Connect button on the Model window's toolbar.
    3. Click the green in_memory oval and then the Iterate Feature Classes hexagon to connect them.
    4. Select Workspace of Feature Dataset from the menu that appears.
    5. 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.   
  5. Add the Table to Excel script to the toolbox and the model:
    1. Visit this page to access Esri's Analysis and Geoprocessing Tool Gallery and extract the tool you need.
    2. Right-click the ArcToolbox at the top of the ArcToolbox pane and select Add Toolbox.
    3. Locate the Additional Conversion - Generic Tools.tbx, from the location to which you extracted it.
    4. Expand that toolbox in the ArcToolbox pane and drag the Table to Excel tool to the Model window.
    5. Double-click the Output File oval of the Table to Excel script you just added to the Model window.
    6. In the Output File field, type %OutputLocation%\%Name%.csv. Click OK.
    7. 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.
    8. Select Input Table from the menu that appears.
  6. Add an output location parameter. This will be the location of the exported .csv files.
    1. Right-click a blank area in the Model window and select Create Variable.
    2. Select String from the list and click OK.
    3. Right-click the String oval in the Model window and select Rename.
    4. Rename it to OutputLocation.
    5. Right-click that OutputLocation oval and select Model Parameter.
  7. Save the model:
    1. In the Model window, click Model > Save As.
    2. Navigate to your database.
    3. Select and existing toolbox or click the New Toolbox button. The toolbox is a place to store your models.
    4. Double click the toolbox.
    5. Name your model and click Save.
QR code for this page

Was this helpful?