By default, POINT records are sorted based on the alphanumeric borehole numbers you assign to them in the PointID field, and the sorting follows standard character sort order. This is the same sort order that Microsoft Excel uses. It affects the order of output of log reports, of records in graphic and text tables, and of boreholes in object selector dropdowns. For example, B-10 will appear before B-2.
Most users want boreholes sorted in a more 'intuitive' fashion, so that B-2 appears before B-10.
There may also be situations in which you need to specify a custom sort order for boreholes so that they output in a different order from the default.
Note: To perform the exercises in this wiki requires the use of these project and library files: 6087.point sort training.zip.
Go to INPUT and open the point sort training.gpj project.
Go to the Lithology tab and click the object selector drop-down arrow. Notice that the order is ‘B-1’, 'B-10',‘B-2’, ‘B-3’... Press Esc.
Go to DATA DESIGN -> Project Database and open the current project (point sort training.gpj). Select ‘POINT’ in the object selector.
Select Tables -> Point Sort Field.
Click Yes to use the built-in sorting method. Notice that GintPointSort has been added to the bottom of the Fields list.
Check Do not display. (This step is optional.)
Go to INPUT -> Lithology tab. Click the object selector drop-down arrow. Notice that the listing order is now ‘B-1’,‘B-2’, ‘B-3’, 'B-10'...
Go to OUTPUT -> Logs.
Select ‘ENVIRONMENTAL BH’ in the object selector and preview the report. Page through the report pages using the object selector, and notice that the order of output is now ‘B-1’,‘B-2’, ‘B-3’, 'B-10'...
Go to the Lithology tab and click the object selector drop-down arrow. Notice that the order is ‘B-1’, 'B-10',‘B-2’, ‘B-3’, ‘CPT-1’, ‘TP-1’. Press Esc.
Click No to use the built-in sorting method. Notice that GintPointSort has been added to the bottom of the Fields list.
Highlight GintPointSort and move it up by repeatedly clicking the Up Arrow icon until it is between PointID and HoleDepth in the list.
Click the Lithology tab. Click the object selector drop-down arrow. Notice that the listing order is now ‘TP-1’, ‘CPT-1’, ‘B-1’, ‘B-2’, ‘B-3’, 'B-10'.
Go to OUTPUT -> Logs. Click in the Sort 1 field.
In the Data Tool under the FILTER heading, select a Table of ‘POINT’ and a Field of ‘GintPointSort’, then click Paste. ‘[POINT].[GintPointSort]’ appears in the Sort 1 field.
Select ‘ENVIRONMENTAL BH’ in the object selector and preview the report. Page through the report pages using the object selector, and notice that the order of output is ‘TP-1’, ‘CPT-1’, ‘B-1’, ‘B-2’, ‘B-3’, 'B-10'. Close the preview.
Go to REPORT DESIGN -> Logs. Select the Properties icon. Notice the Sort Field 1 property. You would enter the same value here as you used in OUTPUT, namely ‘[POINT].[GintPointSort]’, to make this sort order permanent for the report. We will not do this at this time. Click Cancel.
A gINT Rule can be written to insert the values into GintPointSort according to some predefined scheme. Download and install gra007.zip from http://communities.bentley.com/products/geotechnical1/w/wiki/gint-rules-samples.aspx for an example of how this can be done. The gra007.txt file provides an explanation and implementation details.