For localization purposes, the AutoCAD Civil 3D stock subassemblies use an external codes file to define the point, link, and shape codes referenced in the subassemblies.
The external codes file is named C3DStockSubassemblyScripts.codes and is located in the same folder as the C3DStockSubassemblyScripts.dvb file and/or C3DStockSubassemblies.dll file. By default, on English-language based systems, this location is typically C:\ProgramData\Autodesk\C3D <version>\enu. For non-English-language-based systems, the “enu” location corresponds to the appropriate language or region.
The codes file is associated with each subassembly with the CodesSpecific module in the .dvb file. The following sections explain the definition of the code files and how to edit it or add point, link, and shape codes to it.
The CodesSpecific module is in the CodesSpecific.vb file of the C3DStockSubassemblies VB project in the case of .NET subassemblies, and in the .dvb file in the case of VBA subassemblies.
You can open the C3DStockSubassemblyScripts.Codes file with any text editor. Add comments in this file by adding // in front of a sentence. Do not leave any blank lines in the file. Each code line is separated with a return character. Each code definition is comprised of the following components, separated by commas:
The following is an example of a code definition line in the C3DStockSubassemblyScripts.codes file:
38,BottomCurb,BottomCurb,Bottom of curb for a curb without gutter.
The Index number is: 38
The Localized Code is: BottomCurb
The Original Code is: BottomCurb
The Code Description is: Bottom of curb for a curb without gutter.
To change or localize code display names, open the C3DStockSubassemblyScripts.codes file in a text editor and change the Localized Code and or corresponding code description.
For example, the display name of the Curb Bottom can be changed by editing the following bolded components in the C3DStockSubassemblyScripts.codes file as follows:
38,BottomKerb,BottomCurb,Bottom of kerb for a kerb without gutter
If you want to modify existing subassemblies to new codes, or add a new subassembly module, and you would like to use the same structure as default content, for .NET subassemblies you can do the following:
A new code added using these procedures can be used for any existing or new .NET-coded subassemblies in AutoCAD Civil 3D Stock Subassemblies.
For VBA subassemblies, you can do the following:
A new code added using these procedures can be used for any existing or new VBA-coded subassemblies in AutoCAD Civil 3D Stock Subassemblies.
The default subassemblies are generally defined for a wide range of clients and geographical regions. You may want to change some of the display names of catalogs, palettes, tools, or tool variables as applicable to various situations and languages. These catalogs and tool palettes are composed in XML format, in .atc files, and can be edited.
The following list identifies the data element values you can change in the subassembly tool catalog .atc file for localization purposes:
If you plan to install a country kit that contains a region-specific codes file, or, if you plan to install (use) a codes file that contains region-specific content, you must do the following before installing the country kit, or before installing the customized codes file.
Make a backup copy of the region-specific or customized codes file, rename it to the default name of your installed codes file (for example, for English version products, the default codes file is named C3DStockSubassemblyScripts_US.codes) and copy it to the following location: C:\ProgramData\Autodesk\C3D <version>\enu. For non-English-language based systems, the “enu” location should correspond to the appropriate locale.
Note that when AutoCAD Civil 3D is first installed on a new machine, the following two versions of the codes file are installed:
The C3DStockSubassemblyScripts_<locale>.codes file (in this example, C3DStockSubassemblyScripts_US.codes) is installed to provide a backup mechanism for securing codes file content.
When a country kit that contains a region-specific codes file is installed, the localized codes file is installed to C3DStockSubassemblyScripts.codes overwriting the existing file, and a copy is made at C3DStockSubassemblyScripts_<locale>.codes. If you have modified your C3DStockSubassemblyScripts.codes file, this is why it is important to make a backup of it before installing the country kit, or locale-specific codes file.
If you are experiencing unexpected results when using customized subassemblies, or when performing certain AutoCAD Civil 3D corridor modeling tutorials, this may be due to the drawing attempting to reference codes file information that it cannot find. In some cases, these issues can be resolved by updating your existing codes file so that it contains the necessary information.