Professional Documents
Culture Documents
CI4252 Intended for existing AutoCAD Civil 3D users, this class explores the potential of
Subassembly Composer for AutoCAD Civil 3D 2011 and 2012, available in the Subscription Center.
Subassembly Composer provides users with an easy-to-use interface to visually create complex
subassemblies without the need for advanced programming knowledge. With forethought and ingenuity,
users can create custom subassemblies to meet their specific needs that can be used again and again
once they are imported into Civil 3D. Learn what it takes with these in-depth, step-by-step instructions
that will give you the skills to go back to the office and wow your coworkers with your own custom
subassemblies specific to your standards. With the subassemblies already available in the Civil 3D tool
palette and the subassemblies you create with the tool box in the Subassembly Composer, your
corridors will have endless possibilities. Attendees should be familiar with the subassemblies available in
Civil 3D and how to utilize them in assembly and corridor creation.
Learning Objectives
At the end of this class, you will be able to:
Define appropriate input and target parameters that allow for end user customization once they are
imported into Civil 3D
Create a complex flowchart built with subassembly logic tools available in the tool box
Identify Visual Basic expressions and other settings that are available for use when creating
subassembly geometry or constructing conditionals
Evaluate a flowchart and preview a subassembly to confirm that all scenarios have been analyzed
katimercier@gmail.com
www.twitter.com/KDinCTPE
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
The Subassembly Composer consists of five individual window panels: the [Tool Box], the
[Flowchart], the [Preview], the [Properties], and the [Settings and Parameters]. Each of these
window panels may be moved around independently using the docking controls
(icon shown at right) to serve the user‟s needs. At any time the default position
can be regained by going to the View menu and selecting “Restore Default
Layout.”
2 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
The [Flowchart]
The [Flowchart] is workspace used to build and organize the subassembly logic and elements.
A flowchart could be a simple straight line of logic or it can be a complex tree of branching
decisions either way always beginning at the Start element. If there is a problem with your
subassembly a small red circle with an exclamation point will be displayed in the
upper right hand corner of this panel.
The [Preview]
The [Preview] allows you to view your current geometry. There are two preview modes:
Roadway Mode which shows the subassembly built using any target surfaces, target elevations,
and/or target offsets; and
Layout Mode which shows the subassembly built using only the input parameters (no targets).
At the bottom of this panel are two checkboxes for Codes which are shown in brackets [] and
Comments which are shown in parentheses (). If any Codes or Comments were entered in the
properties for the points, links, or shapes then this information will be listed next to the
applicable geometry.
The [Properties]
The [Properties] is the input location of the parameters that define each geometry element.
3 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
Using current Civil 3D functionality this could be obtained by finding the intersection
generated from two surfaces (one temporary surface using a grading object with a feature
line at P1 and generating the shoulder slope extended beyond the intersection, and one
temporary surface using a grading object from a feature line at the desired daylight location
with the target surface elevations and generating the daylight slope beyond the intersection).
To find the intersection you would generate a volume tin between these two temporary
surfaces and using the 0 elevation volume contour as the target for the finished surface‟s
shoulder location and then manually adjust for the minimum shoulder. This procedure is
cumbersome and requires reanalyzing the shoulder target at every change in design.
Instead, we can create a single dynamic corridor model using Subassembly Composer that
will save us a great deal of time.
We will first define the [Packet Settings], which includes the Subassembly Name,
Description, Help File, and Image. This information will be shown on the Tool Palette once
imported into Civil 3D. The Help File and Image are optional however to add them simply
click on the […] button to the right of the entry field to browse to the location.
4 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
For each variable that we want the End User in Civil 3D to have ability to change we must
define an input parameter.
The first line in the Input/Output Parameters tab will always be filled in for you with “Side.” If
you wish to disable this parameter for the End User, set the Default Value as “None.” In this
example we will draw the curb as if it is on the right side and if the End User switches the
Side to Left then the subassembly will mirror itself as defined.
The first four columns (Name, Type, Direction, and Default Value) must be filled in. The last
two columns (DisplayName and Description) are optional. If no DisplayName is provided,
the Name will be displayed for the End User in Civil 3D.
To add a parameter, click the words “Create parameter”. If you inadvertently add too many
parameters, select the one you would like to delete and press the Delete key on your
keyboard.
5 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
There are three types of Targets that can be used: Offset, Elevation, and
Surface. In this example we have two required targets that the End User
must use. The first is the target offset for the daylight, and the second is
the target surface. The offset target can be an alignment, polyline, feature
line, or survey figure.
Just like with the Input/Output Parameters, to add a parameter click the words “Create
parameter”. If you inadvertently add too many parameters, select the one you would like to
delete and press the Delete key on your keyboard.
The full Flowchart is available at the end of the building procedure on page 14 for your
reference. The building procedure has been provided in two columns, at left is the step by
step procedure and at right is a commentary.
a. Drag and drop a Sequence element from the You will notice that all elements
Workflow section of the [Tool Box] to the have multiple connection nodes, at
[Flowchart]. It will automatically connect to the any time you can click on a
Start element. connection arrow and drag it to an
alternate
connection
node.
6 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
b. Rename the Sequence by clicking once on the In this example there are two Input
name of the element and changing it to Parameters which the End User
PositiveVariables. The double click into the must enter as positive values. In
Sequence to add elements. order to avoid any logic errors we
are first going to find the absolute
value of these two inputted
parameters and use those in the
remainder of the calculations.
d. Drag and drop a Define Variable element The Minimum Shoulder Width
(MinShoulder) from the Miscellaneous section should be positive since the side is
of the [Tool Box] to the PositiveVariables being defined by the Side
sequence and set the properties as shown: parameter.
7 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
f. Drag and drop a Decision element from the Since the two target parameters are
Workflow section of the [Tool Box] to the required, we will provide an error
flowchart below the PositiveVariables Sequence. message to the Panorama in Civil
It will automatically connect to the Sequence 3D alerting the End User if they try
element. to run the corridor without these
targets provided. To do this we will
query whether the both targets have
valid input.
g. Define the Condition for the Decision as follows: In order to test two elements at the
same time we are using the ()AND()
expression. In each set of
parenthesis we are going to use a
Subassembly Composer Application
Program Interface (API) function
called “IsValid” which is available for
all of the Target classes. Additional
API expressions are available in the
Appendix of this handout. Note that
if you click on the triangle flag in the
upper right hand corner of the
Decision element the Condition
expression will remain visible.
h. Drag and drop a Report Message element from If you hover over the Decision
the Miscellaneous section of the [Tool Box] to element you will see that the True is
the right (false) side of the Decision element and on the left and the False is on the
define as follows: right. An easy way to remember
what side is true or false for a
decision element is to think „Right
side means it‟s wrong‟. We will want
to give the End User an error if one
If it connects to or from the wrong connection or both of the targets are not valid.
node, simply click on the connection arrow and There are three types of Error
press the Delete key on your keyboard, then Levels: Error, Informational, and
hover over the Decision element and click on the Warning
False connection node and drag it to connect to
the Report Error.
8 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
i. Drag and drop a Point element (P1) from the The origin is the geometry point that
Geometry section of the [Tool Box] to the left your subassembly will attach to
(true) side of the Decision element and let it when generating an assembly in
keep its defaults of being located at the Origin Civil 3D.
and being named P1.
There are nine different Point
Geometry Types.
j. Drag and drop an Auxiliary Point element An auxiliary point or an auxiliary link
(AP1) from the Auxiliary Geometry section of the are used for subassembly
[Tool Box] to below P1 and define as follows: generation but are not displayed in
Civil 3D. They are useful for
intermediate geometry such as this
case. In this example we will be
placing the first auxiliary point at the
minimum shoulder location and
have added a Comment reflecting
that. These Comments can be
viewable in the [Preview] panel.
9 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
k. Drag and drop an Auxiliary Point element The second auxiliary point is
(AP2) to below AP1 and define as follows: located on the target surface at the
target offset. We do not want to put
a normal point at this location yet
because we do not know if this point
will be used or if it will be overridden
with the minimum shoulder test.
Note that the Delta X is purely for
layout purposes and will not be
used since this element is in a
branch that has already tested that
the TargetOffset is valid.
l. Drag and drop a Decision element to below This decision element tests to find if
AP2 and define as follows: the slope between AP1 and AP2
(defined by the Point Class SlopeTo
API Function AP1.SlopeTo
(“AP2”)) is steeper than the
daylight slope provided by the End
User. If it is not steeper, we will
calculate the shoulder location
using the target location. If it is
steeper than the DaylightSlope
variable, that means that the
minimum shoulder value should be
used and a new daylight location
must be calculated. In order to
provide a visual cue to the viewer of
the flowchart, you can edit the True
and False labels to act as a
reminder of what the true and false
mean. In this example, the false will
calculate the hinge point and the
true will use the minimum shoulder
as the hinge point.
10 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
m. Drag and drop a Point element (P2) to the left We will first define the logic using
(true) side of the Minimum Shoulder Decision the minimum shoulder.
element and define as follows:
Since we already have an auxiliary
point at the minimum shoulder
hinge location, there is no need to
recalculate the location, so we will
simply match the location of AP1.
n. Drag and drop a Point element (P3) to below P2 Since the DaylightSlope variable is
(Min Shoulder) and define as follows: positive, we will adjust the slope to
be positive or negative using an IF
statement. This statement tests to
see if the vertical distance from
point P2 to the target surface is
greater than zero, if true then it is in
fill and the negative slope should be
used, if false then it is in cut and the
positive slope should be used.
IF(P2.distancetosurface(TargetSurface)>0, -
DaylightSlope, DaylightSlope)
11 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
o. Drag and drop a Point element (renamed to This point is located at the target
also be P3) to the right side of the Minimum daylight. Since we already have an
Shoulder Decision element and define as auxiliary point AP2 at that location,
follows: the point location does not need to
be recalculated. The Subassembly
Composer will not allow you to
duplicate a point number in a
branch of logic but you are allowed
to duplicate a point number if they
are in separate branches of logic. In
order to maintain consistency we
will continue to use P3 for the
daylight point and P2 for the hinge
point.
p. Drag and drop an Intersection Point element An intersection point allows you to
(renamed to also be P2) from the Advanced find the location where two slopes
Geometry section of the [Tool Box] to below P3 intersect which is perfect for this
(Target Daylight) and define as follows: example. We want the first slope to
be the shoulder grade and we want
to second slope to be the daylight
grade (either positive or negative as
appropriate for if the situation is cut
or fill respectively).
12 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
q. Drag and drop a Sequence element to below Each element can only have one
the current logic. It should automatically connect exiting connection arrow (with the
to either of the end elements, P3 (Daylight exception of Decisions and
Override) or P2 (Calc Shoulder). Add an Switches) but it can have multiple
additional connection arrow so that the branched incoming connection arrows to
logic both uses the same sequence. Rename combine logic.
the Sequence as Links and double click into the
Sequence to add elements.
r. Drag and drop a Link element (L1) from the Since we maintained consistency of
Geometry section of the [Tool Box] into the Links point P2 being the hinge point, we
Sequence and define as follows: can use the same link to define the
shoulder for all scenarios. In this
example we allowed the End User
to define the Link Codes through an
Input Parameter string, if we were
hard entering the Link Codes here
we would need to include the
quotation marks (ex. “Top”,
“Datum”)
s. Drag and drop a Link element (L2) to below L1 Like link L1, by maintaining
in the Links Sequence and define as follows: consistent point numbers, we can
use the same link to define the
daylight link for all scenarios.
The PKT file will be available for download from the AU2011 CI4252 class website after the
associated lecture is given.
13 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
14 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
The next thing to check for any subassembly with targets is that the subassembly is
functional for all potential target values. You can easily assess the targets by either
changing the preview value in the [Target Parameters] tab or by dragging the various targets
in the [Preview] panel. Make certain you are previewing the geometry in Roadway Mode.
In this example we will first make certain that the Target Offset is overridden when the
minimum shoulder decision is triggered. Note that I have turned on the Comments to confirm
which points are being used from the different branches of logic.
15 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
We will also test different values of the TargetSurface. I have shown two examples below. I
recommend for all subassemblies trying a large positive value, a large negative value, and
then on either +/- side of every point, since these tend to be the areas where decision
ranges are most likely to have errors.
16 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
Here is the road assembly created using the stock Civil 3D subassemblies for the road
(LaneSuperelevationAOR), curb (UrbanCurbGutterGeneral), and our custom
VaryingShoulder subassembly:
In this picture of the corridor using this subassembly you can see on the northerly side of the
road how the minimum shoulder was maintained and the target offset line (shown as a
dashed red line) is overridden while on the southerly side of the road the target offset was
maintained and the shoulder width varies.
17 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
The Subassembly Composer is unitless; however, once you import a file into Civil 3D it will
use the default units (feet or meters) that Civil 3D is using when the subassembly is
imported. In this example I will assume that it will be used in Civil 3D Imperial; however, you
will notice I am going to ask the End User for the length and depth dimensions in inches
instead of feet; pay attention when we are building the geometry because each of these
values will be divided by 12 to build the subassembly in feet as required by the default units.
As a reminder to myself, I like to suffix any variables that I am asking the End User to
provide in inches with “IN” to remind myself to convert back into feet in the flowchart.
18 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
For this example there are no Target Parameters which makes this step of the process
simple.
19 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
a. Drag and drop a Sequence element to below Because this is “straight line logic”
the Start element. Double click into the (no decisions, always the same
Sequence to add elements. geometry) we are going to build the
entire subassembly logic inside of a
Sequence.
b. Drag and drop a Point element (P1) into the As previously stated, the
Sequence and define as follows: Subassembly Reference is a good
place to get help in deciding point
codes. Unlike the last example,
because the code is being defined
by the End User and is not a string
input parameter, we must place the
quotes around the word to convert it
into a string.
c. Drag and drop an Auxiliary Point element Point AP1 will be placed at the point
(AP1) to below P1 in the Sequence and define of intersection for the front radius
as follows including the creation of Auxiliary Link curve. In order to draw the radius
element (AL1): we will need to remember that since
all of the Input Parameters are in
inches, we are dividing the
dimensions by 12 to convert the
subassembly into feet.
20 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
d. Drag and drop an Auxiliary Point element Similar to AP1, this will be the point
(AP2) to below AP1&AL1 in the Sequence and of vertical intersection for the back
define as follows including the creation of radius curve.
Auxiliary Link element (AL2):
In addition, we will once again
create an auxiliary link to be used in
defining both the front and back
radius links.
e. Drag and drop a Fillet Arc element (renamed Now that we have an auxiliary link
L2) from the Advanced Geometry section of the for each tangent of the front radius
[Tool Box] to below AP2&AL2 in the Sequence we can define the fillet arc link
and define as follows including the creation of between the two auxiliary links and
Point elements (renamed P2 and P3): at the same time generate the
points at the points of tangency
21 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
f. Drag and drop a Link element (renamed L1) to This generates a link at the face of
below L2&P2&P3 in the Sequence and define as curb.
follows:
g. Drag and drop a Point element (renamed P6) to This point is located at the back
below L1 in the Sequence and define as follows: bottom of curb. We are not
generating a link at this time from
AP2 to P6 because we do not
need/want the link to extend above
the radius instead we want to
generate an auxiliary link. You
cannot create an auxiliary link at the
same time as a point, or a link at the
same time as an auxiliary point.
h. Drag and drop an Auxiliary Link element (AL3) This will create the auxiliary link
to below P6 in the Sequence and define as referenced in the previous step. AL2
follows: and AL3 will be used to generate
the back radius link.
22 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
i. Drag and drop a Fillet Arc element (renamed This step will generate the fillet arc
L4) to below AL3 in the Sequence and define as link for the back of the curb just like
follows including the creation of Point elements the fillet arc link L2 was generated
(renamed P4 and P5): for the front of the curb. In this
example I have chosen to define
this back arc with the “Top” link
code and anticipate connecting a
shoulder surface to point P5.
j. Drag and drop a Link element (renamed L3) to We will continue to add the points
below L4&P4&P5 in the Sequence and define as and links as originally sketched.
follows:
23 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
n. Drag and drop a Shape element (S1) from the When adding a shape element you
Geometry section of the [Tool Box] to below must have a closed set of links. To
P7&L6 in the Sequence and define as follows: pick the shape, do not take time to
figure out the name of each link and
try to Add Link and type in the links,
instead click the green selection
icon to the right of the entry field
and click on the shape in the
[Preview] panel, just like you would
when defining a hatch in AutoCAD.
If you want to change to a different
shape simply select the green
selection icon again and reselect
the new shape, the list of links will
update for you.
The PKT file will be available for download from the AU2011 CI4252 class website after the
associated lecture is given.
24 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
Like the previous example you will want to check that Codes are properly assigned.
Like the previous example you will import the subassembly into a Civil 3D Tool Palette using
the Import Subassemblies command.
Here is the road assembly created using the stock Civil 3D subassemblies for the road
(LaneSuperelevationAOR), our custom precast concrete curb subassembly, shoulder
(LinkWidthAndSlope), and daylight (LinkSlopeToSurface):
Here you can see the tessellation points created by the fillet arc as shown in the assembly:
25 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
A person reviewing my plans recently came to me and informed me that there was a horrible
error with my plans. They were scaling perpendicular to the daylight contours and noticed
that the horizontal distance across a 3‟ vertical change was 5.85‟ which was steeper than
the acceptable 2:1 (it was in fact
1.95:1). I kindly pointed out that
the slope is drawn based on the
road cross section which scaled
as 6.00‟, as expected. After
much discussion there was just
no agreeing to be had and so I
did a quick and dirty fix and set
the cross slope to 2.1:1 instead
of 2.0:1 and everything was
conservatively larger than the
acceptable 2:1.
In order to calculate the link slope based on the profile slope and the maximum allowable
slope we are going to turn to the rules of geometry. We will draw a triangle with leg AC
parallel with the profile baseline and leg AB perpendicular to the profile baseline. We will
define points B and C along the same contour. We will ultimately want to find the value of
the slope along leg AD (SAD) in terms of SAD (the
maximum allowable slope) and SAC (the profile
baseline slope) which are both known values.
therefore
LAD S AD LAC S AC . Since SAD
26 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
and SAC are known values and we can assume that LAC is known based on the elevations
L AC S AC
assumed for A, B, and C, we can solve for LAD: L AD . The triangle AD-DC-CA
S AD
is a right triangle which can be defined by the Pythagorean Theorem:
LAD 2
( LCD ) 2
LAC . Since now LAC and LAD are known, we can solve for LCD:
2
LCD LAC 2 ( LAD ) 2 . The triangle ABC and triangle DAC are similar triangles with the
same angles therefore their sides are ratios of one another which can be defined as
L AB L AD
. Since now LAC, LAD, and LCD are known, we can solve for LAB:
L AC LCD
LAD LAC
L AB . As originally stated, the elevation along line BDC is all the same,
LCD
therefore the elevation change from A to B is the same as the elevation change from A to C,
therefore LAB S AB LAC S AC . Since LAB, LAC, and SAC are all known values, we can
L AC S AC
solve for SAB: S AB . Filling in the solved equation for LAB and simplifying, we get
L AB
S L
that S AB AC CD . Filling in the solved equation for LCD and simplifying, we get that
L AD
S AC L AC 2 ( L AD ) 2
S AB . Filling in the solved equation for L AD and simplifying, we get
LAD
2
S
the final solution of SAB using the known SAC and SAD: S AB S AD 1 AC Note that we
S AD
are keeping SAC such that the sign (+/-) of this slope is maintained if needed, if we do not
want to maintain the sign then we will use the absolute value of S AC.
So what does this really mean? It means that if the profile grade is 0% then the calculated
link slope will equal the maximum allowable grade, but as the profile grade increase (or
decreases) then the link grade will decrease to maintain the maximum allowable grade. This
is displayed in the following table.
27 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
There are five link stock Civil 3D subassemblies that have an input parameter for slope. In
this example we will modify the LinkSlopeToSurface stock subassembly. Currently none of
the stock subassemblies can be directly opened in Subassembly Composer and modified.
Instead we will modify it by looking at the help file and using similar parameters, targets, and
terminology. Like the previous example we will first define the [Packet Settings].
We will match our Input Parameters to those used by the LinkSlopeToSurface stock
subassembly with the exception of Slope which instead of the link slope we will instead ask
the End User for the maximum allowable slope of the surface.
You will note that the AddLinkIn input parameter has a unique type that has been named
CutsFills, this is called Enumeration and is defined by the Subassembly Composer User. To
define an enumeration, go to the View menu and select Define Enumeration.
Create an Enumeration Group named CutsFills and create three enumeration items as
follows:
Once the CutsFills Enumeration Group is created it will show up as an option in the Input
Parameter Type dropdown menu.
We will not be using any of the output parameters for this example.
28 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
For the target parameters we will also match those used by the LinkSlopeToSurface stock
subassembly.
a. Drag and drop a Define Variable element This variable takes the
(ProfileSlope <Double>) to the [Flowchart] and instantaneous slope of the baseline
define as follows: being used by the corridor and finds
the absolute value. Baseline.grade
is an API Function in the Baseline
Class. Other baseline API Functions
include station, elevation, region
start, region end, and turn direction.
The ability to query the baseline is
not currently available in any of the
stock subassemblies.
b. Drag and drop a Decision element to below the This decision will test whether the
ProfileSlope and define as follows: profile slope already exceeds the
input parameter that the End User
defined as the maximum allowable
slope of the surface.
c. Drag and drop a Report Message element to If the profile slope exceeds the
the left (true) side of the Decision and define as maximum allowable slope for that
follows: cross section this error message will
be displayed in Civil 3D‟s
panorama.
29 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
d. Drag and drop a Define Variable element This variable defines the link slope
(LinkSlope <Double>) to the right side of the based on the equation we
Decision and define as follows: previously calculated.
2
S
S AB S AD 1 AC
S AD
f. Drag and drop a Decision element to below P1 This decision will define whether we
and define as follows: are in cut or fill since we will want to
perform different logic for cut and fill
based on the CutsFills input
parameter.
30 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
g. Drag and drop a Decision element to the left If in fill then we want to confirm
(true/Fill) side of the Cut/Fill Decision and define whether the End User has defined
as follows: the AddLinkIn input parameter as
either CutAndFill or Fill Only. (If
false we will perform no logic.)
h. Drag and drop a Point element (P2) to the left The point will be generated from P1
side of the Fill‟s AddLink Decision and define as using the negative value of the
follows: LinkSlope variable since we are in
fill.
i. Drag and drop a Decision element below P2 This decision confirms whether the
(Fill) and define as follows: End User has defined the OmitLink
input parameter as Yes. (If true we
will perform no logic.)
31 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
j. Drag and drop a Link element (L1) to the right If the End User has not set the
(false) side of the Fill‟s AddLink‟s OmitLink OmitLink input parameter to Yes
Decision and define as follows: then we will generate the link from
point P1 to P2 and use the codes
that the End User has provided
through the LinkCode input
parameter in addition to a
“Daylight_Fill” link code.
k. Drag and drop a Decision element to the right Note that steps k. through n. are a
(false/Cut) side of the Cut/Fill Decision and repeat of steps g. through j. for the
define as follows: cut scenario instead of fill.
l. Drag and drop a Point element (renamed to The point will be generated from P1
also be P2) to the left (true) side of the Cut‟s using the positive value of the
AddLink Decision and define as follows: LinkSlope variable since we are in
cut.
32 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
m. Drag and drop a Decision element below P2 This decision confirms whether the
(Fill) and define as follows: End User has defined the OmitLink
input parameter as Yes. (If true we
will perform no logic.)
n. Drag and drop a Link element (L1) to the right Just like in fill, if the End User has
(false) side of the Cut‟s AddLink‟s OmitLink not set the OmitLink input
Decision and define as follows: parameter to Yes then we will
generate the link from point P1 to
P2 and use the codes that the End
User has provided through the
LinkCode input parameter in
addition to a “Daylight_Cut” link
code.
The PKT file will be available for download from the AU2011 CI4252 class website after the
associated lecture is given. The finished flowchart should look similar to the following:
33 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
Like the previous example you will want to check that Codes are properly assigned and that
it behaves as expected for various values of the Input Parameters and Target Parameters.
Like the previous example you will import the subassembly into a Civil 3D Tool Palette.
And the sketch that the person complained had contours closer than 2:1, now looks like this:
34 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
The ShoulderDefine type has two options: BVC and PVI and allows the End User to select what
point their Shoulder Width measures to.
The DisplayName acts not only as clear and concise language to the Civil 3D End User but it
also acts as a comment for the Input Parameter. The Name and the DisplayName are often
similar with spaces added in for the DisplayName. However, you will note that in this example
the DisplayName is helpful in learning that Grade1 refers to the shoulder grade and Grade2
refers to the daylight grade.
35 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
It is always important to turn on the Comments to see if there is any additional information that
the original User provided. Here is the Preview Panel with the Comments turned on:
You will notice that sometimes the text becomes hard to read when there are lots
of points or links. Zooming in will help. In addition if you click on any element in the
[Preview] panel the [Properties] panel will update accordingly. The image at right
shows the Comments turned on and the Codes turned off. The Comments will
always be shown in parentheses () and the Codes will always be shown in
brackets [].
36 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
Remember that you may need to change some of the Input or Target
Parameters to make one of the branches of logic applicable. This can
be done by dragging targets, changing the Preview value of the Target Parameters, or changing
the Default value of the Input Parameters
When imported into Civil 3D and attached to an assembly, the subassembly will be displayed as
follows:
By increasing the value of the Input Parameters for Parabola Horizontal Length and Daylight
Rounding Length you can get a different look as shown in the two images below.
The entire flowchart is shown on the following page. I challenge you to look through it and see
what makes it work.
37 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
38 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
Endless Possibilities
In conjunction with the stock subassemblies already available in the Civil 3D tool palette and the
subassemblies you create with the tool box in the Subassembly Composer, your corridors will
have endless possibilities.
The best way to learn a program is by using it, so go ahead and download the Subassembly
Composer for Civil 3D 2011 & 2012 to your computer if you haven‟t already. Start by composing
a simple subassembly using Subassembly Composer. Before you know it your mind will be
opened to a whole different way of approaching corridors in your design.
39 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
APPENDIX
VB Expressions: Math
Emphasized values can be changed to reference the applicable value.
40 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
VB Expressions: Logic
Emphasized values can be changed to reference the applicable value.
41 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
42 of 43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®
Baseline Class
Baseline.Station Station on assembly baseline
Baseline.Elevation Elevation on assembly baseline
Baseline.RegionStart Station at the start of the current corridor region
Baseline.RegionEnd Station at the end of the current corridor region
Baseline.Grade Grade of assembly baseline
Baseline.TurnDirection Turn direction of assembly baseline (Left = -1, Non-
curve = 0, Right = 1)
*Note assembly baseline may or may not be the subassembly origin
EnumerationType Class
EnumerationType.Value The string value of the current enumeration item
43 of 43