Using ArcFM Solution Desktop
Export Data From Feeder Manager 2.0

Resource Center Home

In the interest of supplying other systems with feeder information, you can use the Export By Feeder geoprocessing tool to extract feeder information from Feeder Manager 2.0. You can run it as a stand-alone tool, or combine it with Esri or third-party geoprocessing tools to construct a model whose output satisfies your organization's particular requirements.

These processes assume that your data is configured for Feeder Manager 2. 

Add the Export By Feeder geoprocessing tool to your toolbox

Because you cannot add a tool to an existing Esri toolbox, add the Export By Feeder GP tool to a new toolbox that you can access from ArcMap or ArcCatalog.

  1. Click Geoprocessing > ArcToolbox.
  2. Right-click ArcToolbox in the ArcToolbox pane and select Add Toolbox.
  3. At the top of the Add Toolbox window, click the New Toolbox icon.
  4. Name the new toolbox, select it, and click open.
  5. Locate and right-click the new toolbox in the ArcToolbox pane. Select Add > Tool.
  6. In the Add Tool window, check Export By Feeder tools. Click OK.
  • Before deleting a database to which you've exported tables using the Export By Feeder tool, you must delete all of its tables and feature classes. 
  • The Export By Feeder tool always runs in the foreground.

Extract feeder information to a database

This is the simplest use case for extracting feeder information from your Feeder Manager 2.0 data. This process involves running the Export By Feeder GP tool outside of the context of the Esri's Model Builder. The end result is the creation of feature classes or tables in a new or existing database that contain Feeder Manager 2.0 information. It extracts data only from feature classes that participate in an electric dataset configured for Feeder Manager 2.0.

  1. Follow the steps above to add the Export By Feeder geoprocessing tool to a new toolbox in ArcMap or ArcCatalog.
  2. Open the toolbox and double-click Export By Feeder.
  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.
  6. Click the folder icon in the Output Database field to specify a database to which tables or feature classes containing feeder information are added. You can use the output Database window to locate an existing database or create a new one. 
  7. If you want to specify a prefix for each of the tables or feature classes generated by this tool, enter it in the Table Prefix field.
  8. If you want to export each feature class without its spatial data, check Export As a Table.
  9. Click OK. The tool runs and generates the feature classes or tables in the database you specified.

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. Download this GP tool from Esri's Geoprocessing Model and Script Tool Gallery.    

Here is example of the model built by this procedure:

  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. Download this GP tool from Esri's Geoprocessing Model and Script Tool Gallery. Extract it.
    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.

Create a model to export feeder information to CAD files

With slight modification, you can use the procedure above to export feeder data to .dxf or .dwg files, instead of .csv files. This option does not require third-party geoprocessing tools or scripts. You'll use the Export By Feeder tool in conjunction with Esri's Model Builder and an out-of-the-box Esri geoprocessing tool to accomplish this.

During step 5 in the previous procedure, substitute the Export to CAD tool for the Table To Excel script. this tool can be found in the ArcToolbox folder titled Conversion Tools > To CAD.

Run the model outside of ArcMap or ArcCatalog

Geoprocessing tools cannot be directly run outside of the ArcMap or ArcCatalog context. In order to accomplish this, you must export your model as a python script. This requires a completed, properly functioning model.

If you used either of the methods described above to export feeder information to .csv, .dxf, or .dwg files, and you plan to run its python script as a scheduled task, you should populate the OutputLocation field and resave the model. This ensures that your scheduled task won't wait for you to specify an output file path before running.
  1. In the Model window, click Model > Export > To Python Script.
  2. Name and save the python script.
  3. You must adjust that python script to include ArcFM licensing information. Open an editor, such as Notepad++, and add the following lines to the top of the script:
    #ArcFM licensing
    import win32com.client
    app = win32com.client.Dispatch("Miner.Framework.Dispatch.MMAppInitializeDispatch")
    runtime = win32com.client.Dispatch("Miner.Framework.Dispatch.MMRuntimeEnvironmentDispatch")
    app.Initialize(0x5)
    #end ArcFm licensing
  4. You can now run this script from outside of an ArcMap or ArcCatalog session. To automate the process of exporting this data, you might use the Microsoft Task Scheduler to create a task that runs nightly.

Share Models

The following is from Esri's ArcGIS 10.1 help topic titled "A quick tour of geoprocessing packages."

"A geoprocessing package is a convenient way to share geoprocessing workflows by packaging one or more tools and the data used by the tools into a single compressed file (.gpk). All resources (models, scripts, data, layers, and files) needed to reexecute the tools are included in the package. This means consumers of your package can rerun your tools to produce the exact same results. They can analyze your tools to understand how you accomplished your workflow and can substitute their own data for the data provided in the package."

Follow this process to create a geoprocessing package from the model you created in previous steps.

  1. In ArcMap, click Geoprocessing > Results.
  2. In the Results pane, right-click your tool and select Share As > Geoprocessing Package.
  3. In the Geoprocessing Package window, click the Save package to file radio button.
  4. Name the package and specify its location.
  5. Click Item Description in the right pane of the Geoprocessing Package window.
  6. Provide a Summary and Tags.
  7. Click Analyze at the top of the window.
  8. Address any errors.
  9. Click Share.

 

 


Send Comment to ArcFMdocumentation@schneider-electric.com