Posted on

Creating a Slope Stake Notes Report Using Visual Report Designer (for AutoCAD Civil 3D)

Creating a Slope Stake Notes Report Using Visual Report Designer (for AutoCAD Civil 3D)

Visual Report Designer (for AutoCAD Civil 3D) includes several features that makes the process of creating a custom slope stake notes report very easy.

We’ll first start with a new report document:


From here, we will add the necessary ‘detail report bands’ to access the corridor section data we need:


Ultimately we are looking for the ‘Aggregated Section Points’ entity. This is a special entity which organizes all points in a section (filtered by code) into collections that represent up to a fixed number of points on each ‘side’ of center, plus a center point (if available) in the first row only.


As you move away from the center point, the offset becomes increasingly larger in the direction you are moving. If too many points exist to contain in a row, another entity is created for the second row, and so forth, until all valid points are accounted for. Each row/entity is accessible as a single row in Visual Report Designer, and the fields of each point contained therein are accessible via the Aggregated Section Points entity fields (using an index to access a specific point/column). The number of columns in a row is controlled via a query extension property as we will later see.

The Aggregated Section Points entity contains several pertinent fields that we will want to access:


For most slope staking notes reports, we will need the point code(s), offset, elevation, and slope from previous point. There are a few nuances that must be accounted for here:

  1. If we simply use the ‘Codes’ field, we will get ALL of the codes on a specific point…typically we would just want to see only those codes which pass the point code filter check, so we will instead use the ‘FilteredCodes’ field.
  2. If we want the point elevations relative to the center of the section (relative to the baseline/profile grade line), we can use the ‘Elevation’ field; if instead we would like the absolute elevation in the project/DWG coordinates, then we use the ‘Elevation’ field located under the ‘Location’ composite entity field:

Now that we have the necessary detail report bands and we know which entities we need to generate the report, we can start adding content to the appropriate band. This is done using a simple drag/drop operation – i.e. drag the desired fields/properties into the appropriate detail band in the report (we’ll do this once for each field to make a complete column):


Now that we have labels in the report which are bound to the desired fields, we must tell the labels specifically which point column we want to access. This is done via the ‘Arguments’ property of the labels, which is accessible via the task list (select the label and click on the ‘>’ icon in the upper-right corner), and also via the label properties if you have the ‘Property Grid’ window open and visible (with the label selected – this will be necessary if you dragged the ‘Location.Elevation’ field into the report as the Arguments property is not shown in the editor for the label associated with this field). For each label, we will add an ‘integer’ argument which represents the column index we want to access. For the center column, the index is zero (0) as shown below…indices on the right side are positive starting at one (1), and negative on the left starting at negative one (-1). Set this property for each of the labels:


Once the center column indices are set, we should also set the formatting for each label. The label bound to the ‘FilteredCodes’ field doesn’t require any special formatting (unless you want to change text style, background color, etc). The ‘Offset’ and ‘Location.Elevation’ values should be formatted to a fized number of decimal places, let’s say 3. To do this, set the ‘FormatString’ property of each associated label as shown below:


Last, we will want to set the ‘Slope From Previous Point’ to display as a percentage with a fixed number of decimal places (2). The proper format string is shown below:


After setting up all of the fields for the center column, we will now copy the labels and repeatedly paste into the detail band to create the additional columns (we could also repeat the process of dragging the fields one at a time and then setting all of the properties). Let’s create 3 columns to each side of center:


Note that some resizing/repositioning of the labels in each column group will likely be necessary to get the labels to all fit within the margins.

Now that we have all of the labels in the detail band, we need to set the column indices to the appropriate values. Remember, if you used the ‘Location.Elevation’ field for the point elevation you will need to use the ‘Property Grid’ to set the value of the ‘Arguments’ property:


This method is actually a bit quicker for the other labels as well, but you are of course able to use the task pane for this task if you prefer… For our report, the column indices are (in order from the left side of the detail band to the right): {-3, -2, -1, 0, 1, 2, 3}

Now that we have the indices all set to the proper values, we will need to add a header to the ‘Sections’ detail band to indicate what stations we are looking at in the report. To do this, simply drag the ‘Station’ field from the ‘Sections’ entity in the field list and drop it somewhere in the middle of the ‘Sections’ detail band:


Once the label is created, we once again need to set the format string (otherwise the value will be shown as a decimal number, not a ‘station’):


We can also resize the label using grip edits, and can change the font, text size, etc:


Last, we need to collapse any unused detail bands to prevent the creation of undesired whitespace in the generated report document:


At this point we are ready to test the report against a corridor model. Before previewing the report, it is always a good idea to save… use the icons in the ribbon bar in the Visual Report Designer application window to do this.

To begin the ‘preview’ process, click on the ‘Print Preview’ tab at the top left side of the Visual Report Designer application window:


When we initiate the ‘preview’ process, we will be shown a dialog in which we can set the query details to choose which entity (or entities) we want to run the report against, and where we can set certain key settings which will be necessary to properly generate the report:

To select which corridor to run the report on, we can use the ‘SelectionSet’ field…click on field to access a set of buttons which will allow you to either select the entity from a list or graphically from the drawing. To run on all corridors, you can skip this step and just leave the selection set empty.

Chances are, there are more point codes in your sections than you will want to show on your slope stakes report. To control which points are used, we must set a filter. To access the settings for this, first expand the ‘Aggregated Section Entities’ property group, and then click on the ‘Aggregated Section Points Entity Options’ property. A button will appear in the value field for this property…click on this to access the ‘Edit Aggregated Section Points Entity Options’ dialog:


In this dialog, we will set the right and left filters independently. For our corridor, we have the following points:

The codes we want to use are highlighted. We will set these as a pipe character (‘|’) delimited list (no spaces), and will use the same filter list for each ‘side’:

The remaining two properties MUST be set to match the number of columns to each side of ‘center’ you designed your report to show. In this case the values are set correctly by default. A value which is too large will cause points to be ‘lost’ as the additional columns are not represented anywhere in the report; a value which is too small will leave columns in the report unused, wasting space in the generated report document.

Once the settings are properly configured, the report can be generated. The result will look similar to this:


From here we are able to export as a PDF, XLS/XLSX file, etc, as well as directly print the document.

Before closing the report, it would be a good idea to switch back to the ‘Report Designer’ tab (where we authored the report template) and save once more to commit the settings you configured while running the report, otherwise you will have to set these anew each time you run the report…

This is a no-frills slope stake notes report, and can form the basis for many variants.  You might want to extend this report by adding a title page, information about the corridor(s) and baseline(s), etc, or even add a cross-section view and forced page breaks.  This is all easily accomplished with Visual Report Designer for AutoCAD Civil 3D.


The web store has been temporarily placed in demo/test mode while we update and test some new features. If you see this message and wish to make a purchase please contact Thank you.