Posted on

Using Paired Points to Calculate Inverse Distances

Using Paired Points to Calculate Inverse Distances

Visual Report Designer contains a very powerful and useful feature called ‘Paired Points’, which allows you to associate multiple ‘child’ points with a primary ‘parent’ point. This was originally developed to enable a customer to describe oil/gas well drill path points, but is useful for countless additional scenarios. One such scenario was recently asked about on the Autodesk Civil 3D general discussion forum. In that post, the user described a need to create a table containing distances between pairs of points (with a naming convention for the pairing similar to ‘pt#’ and ’pt#a’). This is extremely easy to accomplish using Paired Points. Let’s see how.

First, we need to create a new report template and add a Detail Report bound to the Points entity collection. To this we add labels bound to the point name, PairedPoints.PointName, and the PairedPoints.InverseToPrimaryPoint.Distance fields. This is done by simply dragging the desired fields from the Field List and dropping into the report template at the proper locations. We can also a set of column header labels in the primary detail band using the Label control from the toolbox. The report template looks like this:

Visual Report Designer window showing Field List and report template

While not strictly necessary, if desired we can also edit the format of the reported distance as follows:

Format distance label to show only 3 decimal places

As shown, this formatting will cause the reported distances to be shown with 3 decimal places.

Before we can run this, we’ll need some sample data to test with. For our purposes, we will simply create some points manually using the AutoCAD Civil 3D Point Creation Tools. Our points:

Sample point data

Note that we happened to name our points with an underscore separating the parent point name and the suffix portions of the paired point names…you could just as easily leave out the underscore, or use some other convention entirely.  The key to making this work is that the secondary (‘paired’) point name must contain the primary/parent point name plus some sort of suffix, etc.

From here, we can proceed to run our report. When we click on the ‘Print Preview tab in Visual Report Designer to initiate this process, we will be presented with the ‘Edit Queries’ dialog, which is used to configure the report settings and to select which entities should be looked at. One of the settings in this dialog allows you to adjust paired point selection rules – we need to edit this and add a selection rule as shown below:

Edit Queries dialog plus Edit Paired Point Selection Rules popup editor dialog

Because of our point naming convention, we can simply use the default settings for the newly created rule without further modification; however, if your naming convention is different you would need to modify the fields here accordingly.

The final result is shown below:

Previewed report document

From here, the report may be exported as a PDF, Excel spreadsheet, text file, etc, or may be inserted directly into the DWG (model or paper space) where it will look like a table.

 

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 sales@civilplus.net. Thank you.