You are on page 1of 13

The Secret World of AutoCAD Civil 3D Code Sets

Martin Young, AScT Integrated Design

CV318-5
Aren't corridor objects great? They can update with our design changes and are wonderful
for creating finished ground surfaces, calculating volumes, and other tasks. But what about how they look?
How can we control their appearance? How do we control the large amount of link, shape, marker, and
feature line styles? How do we set things up so they will automatically label section information? How do we
create code sets to speed up 3D viewing?
Come to this class and all of these things will be revealed!
Code sets can increase your productivity and accuracy with a few very simple steps. Put them in your
template so they are available to all users. Create custom codes for links and marked points. Create and
apply material area fill styles.

About the Speaker:


Martin currently runs a consulting firm offering services in Civil 3D design, training, customization, and
implementation. His vast project experience, teaching skills, and advanced Civil 3D knowledge have made
him invaluable throughout Western Canada. Martin has been using AutoCAD since 1990 and has served as
CAD manager for several engineering firms. He is a Civil 3D Implementation Certified Expert.
email: mbcyoung@shaw.ca

The Secret World of Code Sets

The Secret World of Code Sets

Code Sets: What are they and where are they Used?

Code Set Styles are found in the Settings tab in the Civil 3D Toolspace under the General/Multipurpose
styles collection (see Figure 1).

Code set styles are used with assemblies, corridors,


and corridor sections. They control the styles for
labels, feature lines, links, shapes, render materials,
and material area fills for those objects. While code
sets may sound a little overwhelming at first, once
weve worked our way through the setup a couple of
times well see its really not that difficult to master.
One of the great things about Civil 3D is the ability to
drag and drop styles into our templates for reuse.
Dragging these new styles and code sets to our
template will save us from repetitive work.

Figure 1

Back to Basics Where Do We Start?


The first thing we need to understand is where these codes come from in the first place. The reason
they are found in the Multipurpose Styles collection is they are used for several objects. While that is
true, the basis for all codes is in the subassembly objects. The first step is to look at the most basic code
set we can, one without any actual codes assigned in it. We do this by selecting Code Set Styles, right
clicking, and selecting New. Our result is a collection of link, point, and shape styles with only <default>
or <no codes> assigned to the object type (see Figure 2)

The Secret World of Code Sets

Figure 2

The reason for this is that no codes from any subassemblies have been assigned to the set. We can
import codes from subassemblies in our drawing by selecting the Import codes button at the bottom right
of the dialogue box seen in Figure 2. Before we do import the codes, lets look at the coding from a
simple subassembly to see the difference between <default> and <no codes>.

First, we will create new styles for the default and no codes and assign different colours to them so we
can differentiate one from the other when assigned to the subassembly. Next we will add the Lane
Outside Super subassembly to the assembly and ensure it is using our Basic code set. We will see that
some of the markers are green (which was assigned to the <default> points) and some are blue
(assigned to the <no codes> points) see Figure 3.

The Secret World of Code Sets

Figure 3

The result is showing is that the blue markers have no codes, meaning we are not able to stylize them
individually or to use those points for output later on in the process. They are used to create links and
feature lines but have no coding for the markers.
Note that everything we see in the assembly of Figure 3 can be assigned a style. The circles are points in
the code set and are assigned marker styles. The marker styles can control the size of the circle, layering,
linetype, colour, etc (much like a COGO point style).
The links are controlled using link styles and the shapes are controlled using the shape styles which will
control the fills, hatching, and colours of the shapes. Code sets also have feature line styles assigned to
the point codes (feature lines are created by joining the points from section to section in the corridor
model). Note that these only have a relationship to the code set when the corridor is created. After that
we must modify feature line styles in the individual corridor itself. That will come up later in the session.
Finally, we can add label styles and fills which we will discuss later as well.

The Secret World of Code Sets

Code Sets and Corridors


Weve looked at how code sets can be used to control the display of assemblies in our drawings. Next,
lets have a look at how we can assign code sets to a corridor object and have the linework in the corridor
look the way we want in a finished drawing for plotting. We can assign layers, colors, linetypes, and
material fills all within a code set. We can go from Before to After as shown in Figure 4.

Figure 4
On the left we see a typical corridor using the all codes code set included with the Civil 3D templates.
On the right we see a corridor ready to plot, including required shading (asphalt), hatch patterns
(sidewalks), and colours and linetypes for the linework. These can be created in a very simple way. Lets
take a look at the example above and how the code set was set up to give us our plot ready view.

As with most design tasks in Civil 3D, there are many ways to approach this goal. The goal of this
exercise is to demonstrate where to find the necessary object styles and how to apply them. The Before
image above was created using the all codes code set. Generally, we will be looking at something similar
to this in our drawing. Lets look at creating a new code set to apply to the corridor.
We can create a new code set or we can copy and modify an existing one. Lets copy the all codes code
set and modify it to suit. The all codes set may not have EVERY code in it. If you find this is the case you
can always add codes that are in the drawing by selecting the import codes button.
First we will change the link styles to no display. The links are the sectional lines created in the corridor.
We dont need to see these for our plot. Luckily we can select all the styles at once using the shift key and
then apply a single style to all link codes. We can then assign these to our corridor using the codes tab
in the corridor properties (see Figure 5).

The Secret World of Code Sets

Figure 5
Now we will only see the lines (feature lines) and points (markers) of the corridor in plan view. We can do
the same thing for the markers (set up no display styles) as we did with the links as we dont need to see
them in our corridor plan view. Shapes arent displayed in plan view so we can ignore those for our
current task.
Next we will modify the fill areas so we can have our hatching display as required. If we wish to see the
pavement as a solid, for example, we modify the material are fill style for the links in the code set (see
Figure 6).

Figure 6

The Secret World of Code Sets

Were almost there; we just need to adjust the linework to match our desired colours, linetypes, etc. The
lines are controlled by feature line styles. These are created as per the code set when the corridor is
created. The gotcha here is that the code set changes we make will apply to all corridor properties except
the feature lines. For example, if we make changes in the code set for the pavement links, this will be
reflected in the corridor object. Changes in the code set for feature lines will not be reflected in a corridor
already created. In this case we need to adjust the feature lines in the corridor under the feature lines
tab. We simply assign new styles to the feature lines (see Figure 7). Be careful not to turn off the
connect toggle as this will affect the model itself, not just the display.

Figure 7

Once we have completed the above, we have a nice, plottable corridor. There is one thing weve left out,
what happens around curves? The best option is to increase the sampling frequency around curves to
make the image appear smooth.

The Secret World of Code Sets

Corridor Section Labels


Using code set markers and labels we can create very detailed section views without actually having to
enter any text or perform any calculations. In our example we are going to work with a code set to label
the top of curb and the slope of our two lanes. We can label cross section grades, slopes, elevations, and
other features of our corridor.
We also can control fill display (curbs, materials in the road section) in sections.
Lets add our new styles to a new code set in our drawing. When creating a new code set we can import
codes from an assembly in the drawing by selecting import codes. Ive chosen to create a new code set
from the assembly and then create a new label style (see Figure 8 below).

Figure 8

The Secret World of Code Sets

In the new label style we can add a line and other label components as fits our requirements. We can
add a link label style and a marker label style and add them to our new code set (see Figure 9).

Figure 9
Once we are happy with our new code set we apply it to our section views and review our newly labeled
objects (see Figure 10).

Figure 10

10

The Secret World of Code Sets

These same code sets can also be applied to our corridor section views when we select the corridors
menu and then select View/Edit Corridor Section. By modifying the settings under the Commands
setting for the view/edit corridor sections (see Figure 11) we can change which code set styles will be
used.

Figure 11

When we select a code set designed for scrolling through sections, it can help us view only what we need
to see and help our design process.

Unique codes can also be created for marked points to add more specific info to our sections. An
example is to create ROW points in our sections using marked points. Blocks can also be added to
display objects such as trees or hydrants in specific sections.

11

The Secret World of Code Sets

Bonus: Increase 3D Viewing speeds


Code sets can be used to improve the speed with which we can view our corridors in 3D. Depending on
what we need to see in 3D we can create, for example, a top links only code set. The simplest way to
create the top links code set is to create a new code set and add the top links to it (see Figure 12). Then
we apply no display styles to all the other objects (be sure that the no display styles have the display
turned off in model view).

Figure 12

Next, apply this set to the corridor and view in 3D with the object viewer (see Figure 13). Only the top
links will display and generation will be much quicker than having the model display all links, feature lines,
markers, and shapes, many of which we may choose not to see in 3D anyway.

12

The Secret World of Code Sets

Figure 13

You now have the ability to control all aspects of the display of your corridor object. Code sets control the
display and labeling of assemblies, corridor objects, and corridor sections.

13

You might also like