CSV to FBK Converter for Civil-3D

This is a utility written in Perl that converts a standard CSV file in PNEZD format into a FBK file that can be imported into Civil-3D.  The descriptions in the CSV file consist of short, easy-to-type commands that auto-generate linework when the FBK file is dumped into Civil-3D.  It is ideal for people with older data collectors that do not have a full alphanumeric keypad, as well as anyone who is trying to transition from Land Desktop to Civil-3D without getting bogged down in the details of the Equipment Database and the Survey Database.  Unfortunately, it may not be particularly easy to customize unless you have some programming experience.  But it may be used freely, without restriction. The code is not precompiled or hidden in any way; it may be freely edited and customized as desired.


The entire FBK implementation leaves much to be desired.  Autodesk's implementation of the Survey Database is ignorant of GPS, which greatly reduces the usability of the entire feature.  The FBK format contains no provision for using a single field shot in multiple figures.  And the FBK implementation creates Survey Figures during the import process, rather than working on data that is already in C3D.  That means editing the data can be problematic, and many edits can only be performed by editing the FBK file and reimporting it, which can be a tedious, error-prone, and time-consuming task.

The net result is that the FBK functionality is a very unwelcome choice for professional surveyors, with limited capabilities.  But although it leaves much to be desired, it is far better than "connecting the dots", and drawing all linework manually in the office.  So while a more-productive choice is probably to purchase a third-party solution, such as the tools available from CadApps, Steltman, Dotsoft, Carlson, or others, the FBK solution can still provide significant productivity gains over manual methods.

The primary reason behind developing this utility was that we have some older data collectors that have only a numeric keypad.  Text is entered into these data collectors using a phone-style text entry, which is rather laborious.  We were able to dump alphanumeric Description Keys from Civil-3D into our data collectors, which let us enter point descriptions by typing only the first letter or two and then selecting the Description Key from a list, which works well.  But unfortunately, Civil-3D requires all Figure Commands to be placed inside of Notes in the data collector, and this feature does not work inside of Notes in our data collectors.  That meant that, in order to key figure commands in Notes the way Civil-3D wants us to, our field surveyors had to do a lot of painful typing on their data collectors.  This utility will parse a CSV dump of field data with linework commands embedded in the Point Descriptions, and turn it into a Civil-3D FBK file.  The field surveyors never need to use Notes, and can collect linework with very little typing in the data collectors.  And it was designed with numeric point codes in mind, so it does not confuse Point Code "1" with Point Code "10" or Point Code "100".

How it Works

Our surveyors use a list of numeric point codes; for example, a "Centerline of Pavement" shot is encoded with the point code "1" in our number system.  This utility parses the descriptions in the CSV file, and turns the numeric codes into an alphanumeric name, which is what gets dumped into Civil-3D.  This name is also used as the name of the Survey Figure.  For example, a point with the number "1" as the description would be inserted into Civil-3D as a shot with the description "CLPV".  If the point is part of a Survey Figure, the figure name would also be "CLPV".

In addition, a String Identifier may also be appended, so that multiple strings may be collected simultaneously.  For example, point code "3" is a "TOE" of slope.  A point with a description of "3.1" would come into Civil-3D with the description "TOE1", and "3.2" would be "TOE2", etc.

Figure Commands have one- or two-letter abbreviations.  For example, "B" is the same as the "BEG" command.  To begin a new figure, the surveyor would key something like "B 1" as the description.  In the FBK file, this becomes a Note line "BEG CLPV", followed by a sideshot with "CLPV" as the description.  If String Identifiers are used, then BEG, CONT, and END commands are added automatically, as-needed, and there is no need for the field surveyor to type them.  For example, two points with the description "1.1" would be connected together, even if there were intervening shots with different descriptions.

When using String Identifiers, it is also possible to use multiple descriptions for one point, separated by decimal points.  This allows the surveyor to take a single shot, and use that shot in multiple survey figures.  To accomplish this, the utility auto-generates additional points, so that each point code in the description gets inserted as a separate point.  For example, a shot with a description of "" would result in TWO shots being inserted into Civil-3D - one with a "CLPV1" description, and the other with a "TOE2" description.  For a more complete description, including examples, see the following document:


This document may be printed and given to the field surveyors to use as a reference.

Using the Utility

This utility is written using Perl, and is designed to be run from a Windows Command Prompt.  First, download and install a Perl compiler/interpreter, such as this (free) one:

ActiveState Perl Distribution

Download the Perl script below and place it in an easily-accessible directory (we use a /Perl directory on a network drive).  Then, so that you don't have to type any long path names, you may want to copy your CSV file to the same directory as the Perl script.  Then start a Windows Command Prompt, change to the directory containing the Perl script and CSV file, and run the script by typing the following at the Command Prompt:

perl fbk.pl MyFile.csv

If the routine creates any new point numbers (for points with multiple point codes, as in the "" example above), the new points are numbered consecutively starting with the number 100000.  If you would like these points to be numbered starting at some other number, include that number as another argument to the perl script.  This command causes the new point numbers to start at 15000, instead of 100000:

perl fbk.pl MyFile.csv 15000

To download the utility, click on the following link:


The list of Point Codes is at the beginning of the Perl script.  This list contains the numeric code and its corresponding alphanumeric name, which should match the Description Keys and Figure Prefixes you have created in your Civil-3D drawing template.  I have left in a set of sample codes, which you may use and/or edit however you wish.