xpswmm/xpstorm Resource Center xps

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

The XP Tables feature offers an excellent complement to the dialog-based user interface. This feature provides views of data and results that can be quickly sorted, edited, and copied to or from other applications such as Microsoft Excel spreadsheets. Filters can also be applied to the table so that only the objects meeting specified criteria are displayed.


The XP Tables feature is used to generate customized tables for both input data and results. Tables may be easily formatted by font, alignment, and numeric format. Data can then be exported as text files or to publishing software.

In this tutorial, the model is used to familiarize you with the procedures used to create, format, and edit data in XP Tables.

  • Create new XP Tables
  • Format column headers and data display in XP Tables 
  • Add a custom variable to an XP Table
  • Import predesigned tables using XPX commands
  • Edit data within XP Tables
Time2 hours
Data files
  • XP Tables1200.xp (starter model)
  • Basic-Tables.xpx (contains predefined tables)

  1. Launch the program and open the model. 
    1. At the opening dialog, navigate to the file XP Tables1200.xp.
    2. Set the active mode to Hydraulics (Hdr).
  2. Open XP Tables:
    1. Launch XP Tables by clicking the XP Table List tool Image Modified or by selecting XP Tables from the Results menu.
    2. There are two tables, Nodes and Conduits. Toggle the display by clicking the named tabs at the bottom of the table.

      Image Modified
      Image Modified

  3. Create a new link table:
    1. In the XP Tables window, click the XP Table List icon Image Modified to launch the following dialog: 

       Image Modified

    2. Select All Objects in Model for the Object Selection drop list. 
    3. Click the Add button.
    4. In the Add Table dialog, select Link for the Display Object and name the table Data & Results

      Image Modified
    5. Click OK. The Variable Selection dialog will be opened. 
    6. In the Variable Selection dialog, select Heading from the Insert Variable Type drop list. 
    7. Click Append.The default name is Heading. Highlight this label and click the Re button and rename the label to Data
    8. Click the Append button to add a second label. 
    9. Rename it as Results
    10. Use the Indent Out button to place the headings at the same level as shown below. 

      Image Modified

    11. Add data columns:
      1. In the Variable Selection dialog, select Links from the Insert Variable Type drop list. 
      2. In the left panel, expand the Link Data tree and select Upstream Node Name
      3. Click Insert
      4. Select Downstream Node Name and click Append
      5. Use the Move Up and Move Down buttons to order the data columns in the right panel and the Indent buttons to make the column headers as shown below. 

        Image Modified

    12. In a similar manner, add LengthDiameter (Height), and Shape columns to the Data section of the table by expanding the Conduit Data tree.
    13. In the left panel, expand the Link Results tree, and HDR Link Results. Add the column Max Flow to the Results section of the table. 
    14. Order the columns as shown below. 

       Image Modified
    15. Click OK to return to the XP Table List dialog.
    16. In the XP Table List dialog, highlight the Data & Results table and click View to display the newly created table.

      Image Modified

      Image Modified

    17. Close XP Tables and save the file as XP Tables 1201.xp.

  4. Format table headings:
    1. Reopen the Data & Results table. 
    2. Place the cursor over the cell labeled Data and right-click. Select Format to open the Variable Format dialog. 

      Image Modified

    3. Set the Alignment to Center and the Style to Bold and then click OK to close.

      Image Modified
    4. Place the cursor over the cell labeled Results and right-click. Choose Format to open the Variable Format dialog. 

      Image Modified

    5. Set the Alignment to Center and the Style to Bold. Click OK to exit.

      Image Modified
    6. Format table columns:.
      1. Place the cursor over the cell labeled Length and right-click. 
      2. Choose Format to open the Variable Format dialog. 

        Image Modified

      3. Set the Precision to 1 and the Colour to blue (from the color dialog). Click OK to close.

        Image Modified

      4. In a similar manner, set the remaining data column headers to blue. 

      5. Set the Precision to 2 for the Diameter and Max Flow columns.

      6. Adjust the column widths and row heights by moving the cursor over borders until the cursor changes to a double arrow. Drag the border to adjust. The completed table is shown below.

        Image Modified

  5. Convert units in XP Tables:
    1. In the XP Tables window, open the Data & Results table. 
    2. Click the Setup Table Variables icon Image Modified to return to the Variable Selection dialog. 
    3. Insert the following duplicate columns: LengthDiameter (Height), and Max Flow

      Image Modified

    4. Click OK to view the table.
    5. On the 2nd Length column, right-click and choose Format from the menu. 
    6. Change the Colour to Green, Precision to 1, and from the Convert to drop list choose Feet (ft; feet)
    7. Make the same changes to the 2nd Diameter (Height) and Max Flow columns. Make sure that you selected Precision as 3 for the Max Flow and Convert to Cubic Feet per Second. 
    8. Click OK to display the table.
    9. In the Data & Results table, note that the Length, Diameter and Max Flow are displayed in both SI and US Customary Units. 

      Image Modified

  6. Create a custom variable in a new table:
    1. Click the XP Tables List tool to return to the XP Tables List dialog. 
    2. Click the Add button. 
    3. Select Node and enter Hydraulics Node as the name of the table.

      Image Modified
    4. Click OK to exit.
    5. Add Invert Elevation and Ground Elevation (Spill Crest) from the HDR Node Data tree. 
    6. Add Max Water Elevation and Free Board from the HDR Node Results tree. 

      Image Modified
    7. Click OK to exit.
    8. In the XP Table List dialog, highlight the Hydraulics Node table line and then click View.

      Image Modified
    9. Add a custom variable:
      1. Click the Setup Table Variables tool to return to the Variable Selection dialog. 
      2. Select Custom Variable from the Insert Variable Type drop list. 
      3. Click Append
      4. In the right panel, rename the variable Node Height

        Image Modified

    10. Click OK to view the Table.

      Image Modified
    11. Add a formula to the custom variable:
      1. Right-click the Node Height column and select Format. In the Variable Format dialog, click the Formula button.
      2. Construct an algebraic expression for Node Height. These expressions can use the contents of other columns in the table, real numbers, and simple mathematical operators. 
      3. Click the Insert box twice to insert two rows. 
      4. Click the first row in the Variables column. 
      5. Select Ground Elevation (Spill Crest) from the drop list. In the Operators column, select minus (-). In the second row, select Invert Elevation. The plus (+) operator in the second row is ignored because there is no following variable.
      6. Click OK twice to view the table.

        Image Modified

        Note that the formats have been revised to display a Precision of 3.

        Image Modified

  7. Create a new table by adding a group of variables:
    1. Click the XP Table List icon to return to the XP Table List dialog. 
    2. Click the Add button. 
    3. Select Node and enter User Inflow as the name of the table, and then click OK.

      Image Modified
    4. In the left panel of the Variable Selection dialog, expand the HDR Node Data tree. Highlight the Time Series Inflow line and drag it to right panel. Click OK.

      Image Modified

    5. Click View to display the XP Tables.

      Image Modified
    6. In the MHA3 row, move the cursor over the User Inflow Hydrograph column and click the down arrow to open the data table. The user inflow data are displayed and may be edited in this window. 

      Image Modified

    7. Click Graph to display the hydrograph. Close the graph window and click the table to close the inflow data dialog.

      Image Modified

    8. Close the XP Tables window.

  8. Import a predefined table:
    1. In the File menu, select Import/Export Data > Import XPX/EPA Data to open the Import dialog. 
    2. Click Select
    3. Navigate to the file Basic-Tables.xpx located in the Templates folder of the program. Make sure the XPX Format File radio button is selected. 
    4. Click Import. A generic warning message is displayed, please ignore it. Click OK.

      Image Modified

    5. Launch XP Tables by clicking the XP Table List tool or by selecting XP Tables from the Results menu. Note that there are several new tabs for the tables.

    6. Click the XP Table List icon to return to the XP Table List dialog. Clear all of tables except Junction Data and Basic Conduit Data
    7. Click View. Note that only the selected tables are displayed.

      Image Modified

  9. Edit data in XP Tables:
    1. In the Junction Data table, note that Constant Inflow is 0.1 m3/s for all nodes. To change the value to 0.2 for all nodes, enter 0.2 in the cell for MHA1. 
    2. Copy the contents to the Windows clipboard by highlighting and pressing <Ctrl> + C, right-click, or using the copy icon from the tool strip.
    3. Drag the cursor down the entire Constant Inflow column and press <Ctrl> + V to paste. Right-clicking and choosing paste from the popup menu also works. 
    4. Close the XP Tables and Save the file.
  10. Use color coding:
    1. Open the XP Tables window and load the Data & Results table. 
    2. Click the Table Display Options icon. 
    3. Set the Readonly Data Background to aqua and the Selected Objects color to yellow.

      Image Modified

    4. Return to the network view. Using the Pointer tool, draw a box around the right half of the network to select the objects in a portion of the drainage system. 

      Image Modified
    5. While the objects are selected, return to the Data & Results table. Note that the background in the Node name and Results columns are aqua indicating that these values are read only. The rows for links LA4 through LA6 are yellow indicating that the objects are selected in the network view. 

      Image Modified

    6. In the toolbar, use the drop menu to change the view from All Objects in Model to Selected objects.

      Image Modified

  11. Use a filter to limit rows in table:
    1. Click the Setup Table Variables tool to return to the Variable Selection dialog. 
    2. In the Settings section, click the Filter button. Use this dialog to set the filter for links with length greater than 150 m. 
    3. Insert a row. 
    4. Select Value for the Compare Type, then set Length for the field and > as the Operation. Enter the 150 m as the Value
    5. Click OK twice to return to the table view.

      Image Modified

      Note that only links longer than 150 m are now displayed in the table.

      Image Modified

    6. Save your file as XP Tables 1202.xp.


  1. Open the Basic Conduit Data table. Right-click the column header and select Sort Ascending. How many conduits are:

    Longer than 200 m                                     ____

    Larger than 2 m in diameter                        ____

  2. What is the maximum hydraulic load at node MHB1?

    Peak flowrate =                                      _____m3/s
  3. What is the total flow through conduit LA6? (Hint: see table Spreadsheet info).

    Total flow =                                             _____ m3

Scroll pdf ignore

Quick Link
titleBack to: Getting Started Training Material

stylepadding: 20px; border-bottom: none !important;
Table of Contents