Cross-Section Modeler VBA
The Cross Section Modeler method is a new and very innovative approach for creating a Proposed 3D model. This is actually my preferred method for creating the models, mostly because with this method, the user can actually produce an accurate proposed .tin file that can be exported to a variety of machine control formats and then uploaded to the heavy equipment for the actual construction of the project. Any surface can be modeled including the bottom of concrete footings, and any surfacing layer.
An optional .xml file can also be produced for use with a variety of stakeout software, specifically the software we use here in WFLHD, Leica Roadrunner.
FIRST OF ALL YOU MUST HAVE THE FOLLOWING:
- A MicroStation design file containing your existing ground and proposed cross section elements, ie. top of pavement, ditch, cut and fill slopes etc...
- A blank 3D MicroStation design file for displaying your 3D model.
Create a new 3D DGN file (name it whatever you want) and open the file.
Open the Cross Section file and invoke D&C Manager, using the pulldowns:
Applications > GEOPAK Road > Design and Computation Manager, or the Road Tools icon, as shown below:
Browse to the MVBA Applications category and double click the item XS Modeler (3D Model from Cross Sections), as shown below:
The Cross Section Modeler dialog will appear, as shown below. The D&C Manager dialog can now be dismissed.
The basis behind this approach to creating a proposed model is to use the little pieces of "search text" that get drawn at every end point on the cross section elements. This application only looks for the search text and actually ignores the elements that are traditionally used to create DTM models.
When the application is first launched, a settings file, (XSModeler.xsm) is copied from the server to the working directory. This settings file populates the Search Text window (shown above) on the right side of the dialog. The name of the settings file is also shown at the top of dialog, (shown above, circled in red). This file can be modified and saved to fit your needs. We'll get back to that later.
The Cross Section Modeler dialog (Left side)
The upper left area of the dialog contains the 3 standard Open/Save icons:
Open Settings File
Save Settings
Save Settings to Another File
The General Tab:
The General tab contains several fields to complete:
- Job: (Select the GPK file using the arrow button)
- XS Chain: (Select the cross section chain using the arrow button).
- Begin Station: (Select the Begin Station using the arrow button or use the id button and data point a cross section cell).
- End Station: (Select the End Station using the arrow button or use the id button and data point a cross section cell).
The Options Tab:
The Options tab contains several fields, options and preferences to be set:
- Spot Point Tolerance: This field and the value that is entered is used for filtering (exactly similar) search text that are very close together.
- Trace Surface Path in Cross Section: When this option is checked ON, user defined element symbology can be set for the application to draw MicroStation lines along the cross section path as defined by the search text.
- Create LandXML File: When this option is checked ON, a profile can be selected from the GPK and a Total Pavement Thickness can be keyed in to reflect and produce a LandXML file, (representing the search text path) for various uses. The Total Pvmt Thickness value needs to be entered as “the vertical difference between the design centerline profile elevation and the centerline elevation of the surface being modeled".
- Create GEOPAK DTM: When this option is checked ON, a DTM (.tin) file will be created that reflects the path of the search text.
- Draw 3D Breaklines: When this option is checked ON, user defined Drawing Preferences can be defined and breaklines (representing the search text path) can be drawn into a 3D MicroStation file.
The Cross Section Modeler dialog (Right side)
The upper right area of the dialog is where the desired search text is defined:
![]()
Define by Symbology: When this icon is pressed, a dialog is presented for selecting levels, colors, lines styles and weights of the search text to be considered, (candidate elements).
Define by D and C Item: When this icon is pressed, a dialog is presented for selecting candidate elements that have set up in the D&C Manager data base.
Highlight Candidate Elements: When this icon is pressed, the actual search text that matches the selected symbology in the cross sections will highlight.
This portion of the dialog presents the results of the candidate element symbology to search for.
The Cross Section Modeler dialog (Remainder)
The center right and lower right area of the dialog is where the magic happens. This is where the user tells the application what search text to look for and what to connect to.
A hierarchal series of search text connection strings are created and saved here.
The two fields directly above the Process button are where the connection strings are initially created:
The left field is the "focus" text that you instruct the application to look for. The right field is "connect to" text. By default the application looks first for the focus text, then also looks for the additional (connect to) text shown in the right field. This will be further explained later.
The four icons located at the far right edge of the dialog assist with compiling the connection strings together, to create the settings file (.xsm file):
Add Search Text to the List: After a connection string is created, press this icon to add it to the list.
Modify search Text: Click a connection string in the collection window to populate the focus and connect to field. Make any desired adjustments and press this icon to make the actual modifications to the list.
Delete Search Text from the List: Click a connection string in the collection window to populate the focus and connect to field. Press this icon to delete the connection string from the list.
Delete All Search Text from the List: Press this icon to delete all connection strings from the list.
How it all works... (a simple example)
In this example we have a very simple set of cross sections that have normal cut and fill slopes and both "V" and "Flat Bottom" ditches. We need the model to reflect correct transitions from cut to fill and vice versa, as well as "V" to "Flat Bottom" ditch and vice versa. We will be modeling subgrade.
NOTE: Proper pattern line placement (and spacing) is extremely important for achieving reasonable results, especially in transition areas.
Search text and their definitions are shown below:
60: Centerline, Subgrade 62: Edge of Shoulder, Subgrade 63: Edge of Widened Shoulder, Subgrade FDT: Front of Ditch BDT: Back of Ditch SSF: Slope Stake in Fill SSC: Slope Stake in Cut
An example cross section is shown below:
Note: The size of the search text has been dramatically increased for this example. Also note that in the example below the text 63 and FDT are not shown, since this section does not have a flat bottom ditch or widening:
A basic, preliminary example of the dialog with the minimum search text connection strings is shown below:
![]()
NOTE: It is important to note that the way this application examines and collects the search text for building the model, is that it always looks BACK at the previous cross section when attempting to connect the dots.
With the .xsm file set up as shown in the dialog above, the application is being instructed to simply connect together just "like" (or exactly similar) text. In other words, just connect all the 60 text together, all the 62 text together, all the BDT text together, etc. This would be fine if there were never any transitions from cut to fill or at the beginning and ending of widening areas or ditch type transitions. This is rarely the case, so the application needs to be able to know what to do if (for instance) we have a situation as show below where we have a ditch on the left at station 49+40 and a fill slope on the left at station 49+50. With the .xsm file set up as shown above there is no way to create break lines representing the transition from a ditch section to a fill slope section.
To solve this problem, the application has the ability to understand a hierarchal series of user defined search text connection strings.
The required modified entry would look as shown in the screen capture below:
Another transitional issue would be where you are transitioning from a fill slope section to a ditch section, just the opposite of the previous example. An example of this scenario is shown below:
The required modified entries would look as shown in the screen capture below:
NOTE: The 2 most important things to remember, with this application is:
- The application looks backwards at the cross sections.
- You must have solutions for transitions that may occur in both directions.
Another transitional issue would be where you are transitioning from a V Ditch section to a Flat Bottom Ditch section. An example of this scenario is shown below:
The required modified entry would look as shown in the screen capture below:
Finally, another transitional issue would be where you are transitioning from a Flat Bottom Ditch section to a V Ditch section, just the opposite of the previous example.
The required modified entry would look as shown in the screen capture below:
Once the dialog settings are complete, the hierarchal series of user defined search text connection strings have been setup and the .xsm file has been saved, press the Process button at the bottom of the dialog.
What to expect:
As mentioned earlier, and if your dialog is setup as shown above, the application will perform the following tasks (in order):
- Process all the cross sections within the station range on the General tab.
- Prompt you for the name of the .dat file to create.
- Prompt you for the name of the 3D MicroStation file to drawing the breaklines.
- Draw the breaklines (and search text) into the 3D file.
- You will also notice that your cross sections now have an additional element drawn (tracing) your search text. These are graphic groups and can be deleted easily, if desired.
To draw the triangles into the 3D file, simply create a .tin file from the .dat file created in step 2 (above) and draw the triangles using your GEOPAK DTM tools.
NOTE: The .tin file can also be exported to a variety of formats for "Machine Control" Stakeout and Construction. To export the .tin file, use the GEOPAK DTM Tools: Utilities > Export DTM as shown below:
Below are a couple of little Retaining Wall videos to illustrate that it is possible now to create a 3D model that reflects transition areas providing that Pattern Line placement and spacing is adequate. These videos attempt to illustrate first a model reflecting subgrade and then fades to the same area of the project only how it would look after completion of the retaining walls.
NOTE: These models were made from the same cross section file... just tracing different search text.
Parapet Wall Video (AVI, 65.88 MB)
Cut Wall Video (AVI, 49.45 MB)