After reading the post “Setting the Survey database Units (Coordinate System) could be CRITICAL” you may wonder “…can we set the survey database distance default to always be US Foot?” The answer is YES YOU CAN! If your company has 4-5 PCs you can simply set each PC manually by following the steps in the post “Keeping Those Settings Intact”. However, if your company has 10 to 15+ PCs – that may span multiple offices – this task becomes a bit more challenging.
After the jump lean how to set all the workstations at your company AUTOMATICALLY.
CREATING A “Survey Database Settings.sdb_set” FILE
First, as described in the “Keeping Those Settings Intact” post, right-click on any existing survey databases and set the “Distance” value to “US Foot”. Then export the settings (show below) to create a “[company name] Survey Database Settings.sdb_set” file (unique name here is important). Save this file in a network path that can be accessed by all CAD workstations.
Next, click the “…edit Survey User Settings” button under the Survey tab to set your installation to read the network path and file. In the below example the path is “N:\Autodesk\LIBapp\Survey\” and the file is “HRG Survey Database settings.sdb_set”
Now you have a couple of options:
OPTION 1 (manual) – You can export the Survey User Settings as well and import on each CAD workstation.
OPTION 2 (automatic) – These setting are stored in the Windows registry. The registry keys can be exported and pushed to each CAD workstation when they login to Windows (or start Civil 3D).
If you would like to learn how to perform OPTION 2 (ADVANCED), keep reading.
EXPORTING SURVEY USER SETTING IN THE WINDOWS REGISTRY:
After setting your PC to read the “[company name] Survey Database Settings.sdb_set” file you created, close Civil 3D. Now go to “Start” in the Windows taskbar and “Run”. There type in “REGEDIT” and click “OK”.
At this point I have to give you the standard “messing with the registry” warning.
Changes made to the Windows registry happen immediately, and no backup is automatically made. Do not edit the Windows registry unless you are confident about doing so. If you proceed you are at your own risk!
Microsoft have issued the following warning with respect to the Registry Editor:
"Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to re-install Windows to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk."
How to back up the registry
Before you edit the registry, you should make a backup (i.e.backup the current settings).
- Open the Registry editor.
- On the ‘Registry’ drop-down menu, click ‘Export Registry File’.
- In the Export range panel, click ‘All’, then save your registry as Backup.
With that out of the way…
Next, you will want to locate the registry folder that contains the Civil 3D Survey User Settings. A simple way to find this folder is to drill down through:
HKEY_CURRENT_USER –> Software –> Autodesk –> AutoCAD –> R17.2.
With “R17.2” selected press F3 on the Keyboard. Note, this assumes you are running Civil 3D 2009. If you are running a different version:
R17.1 = Civil 3D 2008
R17.2 = Civil 3D 2009
R18.0 = Civil 3D 2010
If you recall, we saved the .sdb_set file with a unique name (“[company name] Survey Database Settings.sdb_set”). Search for that name, minus the “.sbd_set” (see below).
The search should locate the key “SdbSettingsFile” and look similar to the image below.
Next, right-click on the directory folder that contains this key and click “Export”. Name the file “[company name] Survey Settings.reg” saving it at the same network path created for the “[company name] Survey Database Settings.sdb_set” file.
The next step is to merge the registry folder into all the CAD workstations.
CREATING A BATCH FILE TO MERGE THE REG FILE:
Right-click on your desktop and click “Text Document”. Name the file “SurveySettings.bat”. Windows should warn you that you are changing the extension and/or file type; click “OK”.
In the batch file place the code:
IF EXIST “%USERPROFILE%\Application Data\Autodesk\C3D 2009\enu\Support\Civil.cui” (
regedit /s “[network path]\[company name] Survey Settings.reg”
where “[network path]” equals the network path of the saved “[company name] SurveySetting.reg” file and “Autodesk\C3D 2009\enu\Support” is the location of the Civil.cui file on your workstation.
The “IF EXIST” statement ensures that the registry merge will only occur if Civil 3D is installed on the workstation and has been run at least one time by the user. Make sure when you’re searching for the Civil.cui file on the C: drive you refer to the one that is stored under the Windows user profile (key)! If you are using Civil 3D 2009, are on Windows XP, and have an out of the box (OTB) installation the path is correct in the sample code above.
Finally, have your company computer guys, I.T. department, or whomever, call this batch file from the company login script. Again, if the workstation doesn’t have Civil 3D installed it won’t run. If it is installed but has not been run by the the user yet, it won’t run (key). The code to call a batch file is:
CALL “[network path]\SurveySettings.bat”
At a minimum, if you don’t have a company login script you can send an email in regard to the importance of this setting and have folks close Civil 3D and run this batch file.
THAT’S IT, I hope this helps… 🙂