43
Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD ® Civil 3D ® Kati L. Mercier, P.E. Nathan L. Jacobson & Associates, Inc. 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 About the Speaker Kati Mercier, earned her B.S. in civil engineering from Virginia Tech in 2004. Since then she has worked as a project engineer at Nathan L. Jacobson & Associates, Inc., a consulting civil and environmental engineering firm in Chester, Connecticut. The firm specializes in providing engineering consultation, review, and design to local municipalities and private clients. Kati has earned her Professional Engineering license in the states of Connecticut and New York. Recently she has played a significant role in transitioning the firm from Land Desktop to Civil 3D. Kati is an AutoCAD Civil 3D 2011 Certified Professional and a contributor to the civil4d.com blog. She is also an active participant in the Autodesk Subassembly Composer for AutoCAD Civil 3D 2011 discussion group. [email protected] www.twitter.com/KDinCTPE

Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

  • Upload
    dinhkiet

  • View
    1.996

  • Download
    31

Embed Size (px)

Citation preview

Page 1: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD

® Civil 3D

®

Kati L. Mercier, P.E. –Nathan L. Jacobson & Associates, Inc.

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

About the Speaker Kati Mercier, earned her B.S. in civil engineering from Virginia Tech in 2004. Since then she has worked

as a project engineer at Nathan L. Jacobson & Associates, Inc., a consulting civil and environmental

engineering firm in Chester, Connecticut. The firm specializes in providing engineering consultation,

review, and design to local municipalities and private clients. Kati has earned her Professional

Engineering license in the states of Connecticut and New York. Recently she has played a significant

role in transitioning the firm from Land Desktop to Civil 3D. Kati is an AutoCAD Civil 3D 2011 Certified

Professional and a contributor to the civil4d.com blog. She is also an active participant in the Autodesk

Subassembly Composer for AutoCAD Civil 3D 2011 discussion group.

[email protected]

www.twitter.com/KDinCTPE

Page 2: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

2 of 43

Autodesk Subassembly Composer for AutoCAD Civil 3D The „Subassembly Composer® for AutoCAD Civil 3D®‟ (hereafter

referred to as Subassembly Composer) program is used to create

subassemblies to supplement the stock subassemblies that come with

Civil 3D. Before composing any subassembly, one of the first

documents you should examine is the “AutoCAD Civil 3D

Subassembly Reference document” (scan QR code at right or go to

http://images.autodesk.com/adsk/files/c3dstocksubassemblyhelp.pdf ).

If you can‟t find a stock subassembly that will solve your problem, this

document will be a beneficial aid in using terminology and naming conventions that are already

standard to Civil 3D users. You may think that when you make your own subassembly that

these conventions are not important. But you may wish to share the assembly with coworkers

and colleagues in the future, or you may return to it after a while and it will be easier to

understand if you use already established naming conventions.

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.”

Page 3: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

3 of 43

The [Tool Box]

The [Tool Box] is the storage location for elements available for constructing the subassembly.

This panel will provide all of the elements used to build your flowchart. There are five sections:

Geometry, Advanced Geometry, Auxiliary, Workflow, and Miscellaneous. To use any of these

elements you simply click on the desired element and drag and drop it over into the [Flowchart].

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.

The [Settings and Parameters]

The [Settings and Parameters] consists of five tabs that define the subassembly: Packet

Settings, Input/Output Parameters, Target Parameters, Superelevation, and Event Viewer.

The Typical Workflow The typical workflow for creating a subassembly is broken into six steps. This is the process we

will be using for all of our examples. For the purposes of this handout we will refer to the user of

Civil 3D who is using the subassembly as the “End User” and the user of the Subassembly

Composer who is making the subassembly as the “User”. The six steps are:

1. Sketch the subassembly or ”the problem”

2. Define the [Input/Output Parameters] for the End User

3. Define the [Target Parameters] for the End User

4. Build the subassembly using the [Tool Box]

5. Evaluate your subassembly and modify as necessary

6. Import into AutoCAD® Civil 3D®

Page 4: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

4 of 43

Example 1: Varying Shoulder 1. Sketch the subassembly or ”the problem”:

In a typical shoulder and daylight

scenario, we could have a constant

shoulder and the daylight location on

the target surface is calculated. In

this first example, however, we

instead have a known daylight target

location (Offset) and the shoulder width is variable based on the shoulder slope and daylight

slope. This scenario allows the End User to provide a large shoulder for future development

within a pre-established right of way.

There may be some instances where

the End User wants to maintain a

minimum shoulder width due to

excessive cuts/fills. In which case,

the offset target will not be used and

an easement would be required.

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.

Page 5: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

5 of 43

2. Define the [Input/Output Parameters] for the End User:

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.

There are a total of eight Input/Output Parameter Types provided in the

program (you can make more types using Enumeration which we will

discuss later). In this example we will be using Double numbers, which allow

for decimal precision, alternatively you could limit the End User to inputting

Integer numbers, which allows only whole number values. We will also be

using Slope (Horizontal:Vertical), Grade (%), and String (text).

For this example we will not be defining any 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.

Page 6: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

6 of 43

3. Define the [Target Parameters] for the End User:

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.

4. Build the subassembly using the [Tool Box]:

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

Workflow section of the [Tool Box] to the

[Flowchart]. It will automatically connect to the

Start element.

You will notice that all elements

have multiple connection nodes, at

any time you can click on a

connection arrow and drag it to an

alternate

connection

node.

Page 7: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

7 of 43

b. Rename the Sequence by clicking once on the

name of the element and changing it to

PositiveVariables. The double click into the

Sequence to add elements.

In this example there are two Input

Parameters which the End User

must enter as positive values. In

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.

c. Drag and drop a Define Variable element

(DaylightSlope) from the Miscellaneous section

of the [Tool Box] to the PositiveVariables

sequence and set the properties as shown:

A variable is similar to an input

parameter, however it is defined by

you instead of the Civil 3D End

User. Math.abs() is one of many

math Visual Basic (VB) expressions

that can be used in calculations.

Additional math VB expressions can

be found in the Appendix of this

handout. The Cut/Fill Daylight Slope

should be positive since in this

subassembly the same slope will be

used for cut and fill therefore the

logic will define the + or – and not

by the End User.

d. Drag and drop a Define Variable element

(MinShoulder) from the Miscellaneous section

of the [Tool Box] to the PositiveVariables

sequence and set the properties as shown:

The Minimum Shoulder Width

should be positive since the side is

being defined by the Side

parameter.

e. Exit out of the Sequence click the Flowchart in

the nest links at the top of the [Flowchart] panel.

Page 8: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

8 of 43

f. Drag and drop a Decision element from the

Workflow section of the [Tool Box] to the

flowchart below the PositiveVariables Sequence.

It will automatically connect to the Sequence

element.

Since the two target parameters are

required, we will provide an error

message to the Panorama in Civil

3D alerting the End User if they try

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

the Miscellaneous section of the [Tool Box] to

the right (false) side of the Decision element and

define as follows:

If it connects to or from the wrong connection

node, simply click on the connection arrow and

press the Delete key on your keyboard, then

hover over the Decision element and click on the

False connection node and drag it to connect to

the Report Error.

If you hover over the Decision

element you will see that the True is

on the left and the False is on the

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

or both of the targets are not valid.

There are three types of Error

Levels: Error, Informational, and

Warning

Page 9: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

9 of 43

i. Drag and drop a Point element (P1) from the

Geometry section of the [Tool Box] to the left

(true) side of the Decision element and let it

keep its defaults of being located at the Origin

and being named P1.

The origin is the geometry point that

your subassembly will attach to

when generating an assembly in

Civil 3D.

There are nine different Point

Geometry Types.

j. Drag and drop an Auxiliary Point element

(AP1) from the Auxiliary Geometry section of the

[Tool Box] to below P1 and define as follows:

An auxiliary point or an auxiliary link

are used for subassembly

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.

Note that you can expand or

collapse any of the Property

elements by clicking on the triangle

to the left (ex. Link). For any of the

images provided in this handout that

have a property collapsed, you can

assume that the default values were

utilized.

Page 10: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

10 of 43

k. Drag and drop an Auxiliary Point element

(AP2) to below AP1 and define as follows:

The second auxiliary point is

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

AP2 and define as follows:

This decision element tests to find if

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.

Page 11: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

11 of 43

m. Drag and drop a Point element (P2) to the left

(true) side of the Minimum Shoulder Decision

element and define as follows:

We will first define the logic using

the minimum shoulder.

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

(Min Shoulder) and define as follows:

Note that the Slope expression reads as follows:

IF(P2.distancetosurface(TargetSurface)>0, -

DaylightSlope, DaylightSlope)

Since the DaylightSlope variable is

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 an expression becomes too long

to be fully visible, simply click the

[…] button to the right of the

expression to open the Expression

Editor window to see the full

expression.

Page 12: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

12 of 43

o. Drag and drop a Point element (renamed to

also be P3) to the right side of the Minimum

Shoulder Decision element and define as

follows:

This point is located at the target

daylight. Since we already have an

auxiliary point AP2 at that location,

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

(renamed to also be P2) from the Advanced

Geometry section of the [Tool Box] to below P3

(Target Daylight) and define as follows:

Note that the Slope 2 expression reads in full as

follows:

IF(AP1.Slopeto("AP2")>ShoulderGrade,

DaylightSlope, -DaylightSlope)

An intersection point allows you to

find the location where two slopes

intersect which is perfect for this

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).

For Slope 2 we have used an IF

statement to test if the slope from

AP1 to AP2 is greater than the

shoulder grade. If true a positive

daylight slope will be used and if

false a negative daylight slope will

be used.

Slope 2 (the daylight slope) is

extended meaning that it extends

out of both sides of Point 2 and not

just in one direction. Experiment

with the extending and reversing

slopes to find the combination that

works best for your situation.

Page 13: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

13 of 43

q. Drag and drop a Sequence element to below

the current logic. It should automatically connect

to either of the end elements, P3 (Daylight

Override) or P2 (Calc Shoulder). Add an

additional connection arrow so that the branched

logic both uses the same sequence. Rename

the Sequence as Links and double click into the

Sequence to add elements.

Each element can only have one

exiting connection arrow (with the

exception of Decisions and

Switches) but it can have multiple

incoming connection arrows to

combine logic.

r. Drag and drop a Link element (L1) from the

Geometry section of the [Tool Box] into the Links

Sequence and define as follows:

Since we maintained consistency of

point P2 being the hinge point, we

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

in the Links Sequence and define as follows:

Like link L1, by maintaining

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.

Page 14: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

14 of 43

5. Evaluate your subassembly and modify as necessary:

Before finalizing a subassembly it is important to pay attention to some key components in

the [Preview] panel. In this example, the first thing that we want to do is select the checkbox

for Codes. This will allow the codes which are assigned to the points, links, and shapes to

display. For each example you want to check to make sure that the links have the desired

link codes, that any points have the desired point codes, and that the shapes have the

desired shape codes.

Page 15: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

15 of 43

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.

Page 16: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

16 of 43

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.

6. Import into AutoCAD® Civil 3D®:

Once you are ready to import your subassembly into

the Civil 3D Tool Palette. Save your PKT file and open

up Civil 3D. To import the subassembly go to the Insert

tab in Civil 3D, expand the Import panel, and select

Import Subassemblies. The Import Subassemblies

window as shown on the following page will open.

Browse to your PKT file and add it to a Tool Palette (in

this example, I‟ve made a custom tool palette for all of

my AU subassemblies).

Page 17: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

17 of 43

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.

Page 18: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

18 of 43

Example 2: Precast Concrete Curb 1. Sketch the subassembly or “the problem”:

This is a construction detail for concrete curbing

that our office frequently uses and while we can

generate a proposed top surface that is similar, it

does not include the radius at the top gutter edge.

Therefore this is a good candidate for a

Subassembly Composer generated subassembly.

Like the previous example we will first define the

[Packet Settings].

2. Define the [Input/Output Parameters] for the End User:

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.

Page 19: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

19 of 43

3. Define the [Target Parameters] for the End User:

For this example there are no Target Parameters which makes this step of the process

simple.

4. Build the subassembly using the [Tool Box]:

Before building the logic for your subassembly, it is

sometimes helpful to draw in the points on your original

sketch and number them sequentially (just like a “Connect

The Dots” drawing) and similarly label each link between a

pair of points. You will want a point at every change in

direction of a link. As you can see by the finished sequence

at right, we can‟t always define the points sequentially in the

logic but it will make much more sense if your point numbers

are continuous around a shape.

Similar to the last example, the building procedure has been

provided in two columns, at left is the step by step procedure

and at right is a commentary.

Page 20: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

20 of 43

a. Drag and drop a Sequence element to below

the Start element. Double click into the

Sequence to add elements.

Because this is “straight line logic”

(no decisions, always the same

geometry) we are going to build the

entire subassembly logic inside of a

Sequence.

b. Drag and drop a Point element (P1) into the

Sequence and define as follows:

As previously stated, the

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

(AP1) to below P1 in the Sequence and define

as follows including the creation of Auxiliary Link

element (AL1):

Point AP1 will be placed at the point

of intersection for the front radius

curve. In order to draw the radius

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.

With each point or auxiliary point

there is the option to add a link or

auxiliary link from the “From Point”

to the point or auxiliary point being

generated. In this case we will soon

be defining the front radius link

between two links so we will take

this opportunity to define the first of

these two auxiliary links needed

later.

Page 21: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

21 of 43

d. Drag and drop an Auxiliary Point element

(AP2) to below AP1&AL1 in the Sequence and

define as follows including the creation of

Auxiliary Link element (AL2):

Similar to AP1, this will be the point

of vertical intersection for the back

radius curve.

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

L2) from the Advanced Geometry section of the

[Tool Box] to below AP2&AL2 in the Sequence

and define as follows including the creation of

Point elements (renamed P2 and P3):

Now that we have an auxiliary link

for each tangent of the front radius

we can define the fillet arc link

between the two auxiliary links and

at the same time generate the

points at the points of tangency

The tessellation of an arc is the

number of segments that are

generated to create the arc.

Page 22: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

22 of 43

f. Drag and drop a Link element (renamed L1) to

below L2&P2&P3 in the Sequence and define as

follows:

This generates a link at the face of

curb.

g. Drag and drop a Point element (renamed P6) to

below L1 in the Sequence and define as follows:

This point is located at the back

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)

to below P6 in the Sequence and define as

follows:

This will create the auxiliary link

referenced in the previous step. AL2

and AL3 will be used to generate

the back radius link.

Page 23: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

23 of 43

i. Drag and drop a Fillet Arc element (renamed

L4) to below AL3 in the Sequence and define as

follows including the creation of Point elements

(renamed P4 and P5):

This step will generate the fillet arc

link for the back of the curb just like

the fillet arc link L2 was generated

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

below L4&P4&P5 in the Sequence and define as

follows:

We will continue to add the points

and links as originally sketched.

k. Drag and drop a Link element (L5) to below L3

in the Sequence and define as follows:

Page 24: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

24 of 43

l. Drag and drop a Point element (renamed P7) to

below L5 in the Sequence and define as follows

including the creation of Link element (L6):

m. Drag and drop a Link element (L7) to below

P7&L6 in the Sequence and define as follows:

n. Drag and drop a Shape element (S1) from the

Geometry section of the [Tool Box] to below

P7&L6 in the Sequence and define as follows:

When adding a shape element you

must have a closed set of links. To

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.

Page 25: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

25 of 43

5. Evaluate your subassembly and modify as necessary:

Like the previous example you will want to check that Codes are properly assigned.

6. Import into AutoCAD® Civil 3D®:

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:

Page 26: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

26 of 43

Example 3: Link Max Slope 1. Sketch the subassembly or “the problem”:

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.

This problem arose because the

slope of the baseline profile and

the perpendicular cross slope

combine to make the slope as

measured perpendicular to the

contours. When I learned that

the Subassembly Composer

could perform calculations using an API Function for the baseline grade I knew that the

problem could finally be dynamically solved.

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.

Since the elevation along line BDC is all the

same therefore the elevation change from A to D

is the same as the elevation change from A to C,

therefore ACACADAD SLSL

. Since SAD

Page 27: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

27 of 43

and SAC are known values and we can assume that LAC is known based on the elevations

assumed for A, B, and C, we can solve for LAD: AD

ACAC

ADS

SLL . The triangle AD-DC-CA

is a right triangle which can be defined by the Pythagorean Theorem:

222)( ACCDAD LLL . Since now LAC and LAD are known, we can solve for LCD:

22)( ADACCD LLL . 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

CD

AD

AC

AB

L

L

L

L . Since now LAC, LAD, and LCD are known, we can solve for LAB:

CD

ACAD

ABL

LLL . As originally stated, the elevation along line BDC is all the same,

therefore the elevation change from A to B is the same as the elevation change from A to C,

therefore ACACABAB SLSL . Since LAB, LAC, and SAC are all known values, we can

solve for SAB:

AB

ACAC

ABL

SLS . Filling in the solved equation for LAB and simplifying, we get

that AD

CDAC

ABL

LSS . Filling in the solved equation for LCD and simplifying, we get that

AD

ADACAC

ABL

LLSS

22)(

. Filling in the solved equation for LAD and simplifying, we get

the final solution of SAB using the known SAC and SAD: 2

1

AD

ACADAB

S

SSS Note that we

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 SAC.

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.

Calculated Link Grade

(%)

Profile Grade (%)

0.0% 5.0% 10.0% 12.0% 15.0%

Maximum

Allowable

Grade (%)

20.0% 20.0% 19.4% 17.3% 16.0% 13.2%

25.0% 25.0% 24.5% 22.9% 21.9% 20.0%

33.3% 33.3% 33.0% 31.8% 31.1% 29.8%

50.0% 50.0% 49.7% 49.0% 48.5% 47.7%

Page 28: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

28 of 43

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].

2. Define the [Input/Output Parameters] for the End User:

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.

Page 29: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

29 of 43

3. Define the [Target Parameters] for the End User:

For the target parameters we will also match those used by the LinkSlopeToSurface stock

subassembly.

4. Build the subassembly using the [Tool Box]:

a. Drag and drop a Define Variable element

(ProfileSlope <Double>) to the [Flowchart] and

define as follows:

This variable takes the

instantaneous slope of the baseline

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

ProfileSlope and define as follows:

This decision will test whether the

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

the left (true) side of the Decision and define as

follows:

Note that the Message expression reads as

follows:

Slope of baseline exceeds Maximum Allowable

Slope

If the profile slope exceeds the

maximum allowable slope for that

cross section this error message will

be displayed in Civil 3D‟s

panorama.

Page 30: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

30 of 43

d. Drag and drop a Define Variable element

(LinkSlope <Double>) to the right side of the

Decision and define as follows:

Note that the expression reads as follows:

Math.abs(MaxSlope)*math.sqrt(1-

math.pow(ProfileSlope/MaxSlope,2))

This variable defines the link slope

based on the equation we

previously calculated.

2

1

AD

ACADAB

S

SSS

By adding this element to any

subassembly you can use

maximum slope instead of the slope

perpendicular to the baseline. If we

had not previously defined the

ProfileSlope variable we could

alternatively use the baseline.grade

API Function in this VB expression

in place of ProfileSlope.

e. Drag and drop a Point element (P1) to below the

LinkSlope and define as follows:

f. Drag and drop a Decision element to below P1

and define as follows:

This decision will define whether we

are in cut or fill since we will want to

perform different logic for cut and fill

based on the CutsFills input

parameter.

Page 31: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

31 of 43

g. Drag and drop a Decision element to the left

(true/Fill) side of the Cut/Fill Decision and define

as follows:

If in fill then we want to confirm

whether the End User has defined

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

side of the Fill‟s AddLink Decision and define as

follows:

The point will be generated from P1

using the negative value of the

LinkSlope variable since we are in

fill.

i. Drag and drop a Decision element below P2

(Fill) and define as follows:

This decision confirms whether the

End User has defined the OmitLink

input parameter as Yes. (If true we

will perform no logic.)

Page 32: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

32 of 43

j. Drag and drop a Link element (L1) to the right

(false) side of the Fill‟s AddLink‟s OmitLink

Decision and define as follows:

If the End User has not set the

OmitLink input 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_Fill” link code.

k. Drag and drop a Decision element to the right

(false/Cut) side of the Cut/Fill Decision and

define as follows:

Note that steps k. through n. are a

repeat of steps g. through j. for the

cut scenario instead of fill.

If in cut then we want to confirm

whether the End User has defined

the AddLinkIn input parameter as

either CutAndFill or Cut Only. (If

false we will perform no logic.)

l. Drag and drop a Point element (renamed to

also be P2) to the left (true) side of the Cut‟s

AddLink Decision and define as follows:

The point will be generated from P1

using the positive value of the

LinkSlope variable since we are in

cut.

Page 33: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

33 of 43

m. Drag and drop a Decision element below P2

(Fill) and define as follows:

This decision confirms whether the

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

(false) side of the Cut‟s AddLink‟s OmitLink

Decision and define as follows:

Just like in fill, if the End User has

not set the OmitLink input

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:

Page 34: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

34 of 43

5. Evaluate your subassembly and modify as necessary:

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.

6. Import into AutoCAD® Civil 3D®:

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:

Page 35: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

35 of 43

Example 4: Backwards Engineering There is going to be a point in the future that you are going to come across a PKT file that you

made months ago or a PKT file that someone else made. Most likely you are opening up this

mysterious PKT file because you have found a mistake in how it behave in Civil 3D or you want

to edit it for different Civil 3D capabilities. So instead of building the subassembly you are going

to have to understand how the subassembly was built. In this last example, instead of going

through the six step workflow we are going to look at a subassembly that I previously created

and understand how to make sense of the logic.

Parabolic Rounding With Daylight Fillet This example provides parabolic rounding at the Point of Vertical Intersection (PVI) between the

shoulder and daylight links as well as fillet rounding between the daylight link and target surface.

In addition, the End User is provided the option to either define the shoulder width dimension

from the origin to the PVI (P1 to P2, as currently designed) or from the origin to the Beginning of

Vertical Curvature or BVC (P1 to AP3). The flowchart is provided on page 38 and the PKT file is

available for download from the AU2011 CI4252 class website after the associated lecture is

given.

The Input Parameters are as follows:

The ShoulderDefine type has two options: BVC and PVI and allows the End User to select what

point their Shoulder Width measures to.

The Target Parameters are as follows:

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.

Page 36: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

36 of 43

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 [].

When evaluating a subassembly in the [Preview] panel it is sometimes helpful to temporarily

create a couple of test target parameters to act like grid lines as shown below. The targets will

not be associated with any logic. By dragging these temporary target gridlines to various

locations, the value of the offsets and elevations of various points will be displayed in the

[Target Parameters] panel. Just don‟t forget to delete these temporary targets before saving and

importing into Civil 3D.

Page 37: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

37 of 43

To analyze a flowchart it is best to start at the top and analyze down

one branch at a time. By deleting some connection arrows, you can

view only the logic that is connected to the Start element. By

disconnecting and connecting several elements you can slowly begin

to see how the geometry is built.

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.

Page 38: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

38 of 43

Page 39: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

39 of 43

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.

For Further Assistance 1. Autodesk® WikiHelp for Autodesk Subassembly Composer:

http://wikihelp.autodesk.com/AutoCAD_Civil_3D/enu/2012/Help/Auto

desk_Subassembly_Composer

2. Autodesk® Discussion Groups for AutoCAD Civil 3D:

http://forums.autodesk.com/t5/AutoCAD-Civil-3D/bd-p/66

3. AutoCAD Civil 3D Subassembly Reference:

http://images.autodesk.com/adsk/files/c3dstocksubassemblyhelp.pdf

4. Twitter hashtag: #SACCivil3D

Page 40: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

40 of 43

APPENDIX

VB Expressions: Math Emphasized values can be changed to reference the applicable value.

Sample VB Expression Output Description

math.round(2.568,2) 2.57 Returns a value rounded to the nearest specified

decimal places (ex. -2 = hundreds, -1 = tens, 0 =

whole number, 1 = tenths, 2 = hundredths, etc.)

math.floor(2.568) 2 Returns the largest integer that is less than or equal to

the specified value (i.e. rounds down)

math.ceiling(2.568) 3 Returns the smallest integer that is greater than or

equal to the specified value (i.e. rounds up)

math.max(2.568,0.813) 2.568 Returns the larger of a series of two specified values

math.min(2.568,0.813) 0.813 Returns the smaller of a series of two specified values

math.abs(-2.568) 2.568 Returns the absolute value

math.pi 3.14159... Returns the value of the constant pi

math.e 2.71828... Returns the value of the constant e

math.sin(math.pi) 0 Returns the sine of a specified angle measured in

radians

math.cos(math.pi) -1 Returns the cosine of a specified angle measured in

radians

math.tan(math.pi) 0 Returns the tangent of a specified angle measured in

radians

math.asin(1) 1.57079... Returns the angle measured in radians whose sine is

the specified value

math.acos(1) 0 Returns the angle measured in radians whose cosine

is the specified value

math.atan(1) 0.78539... Returns the angle measured in radians whose tangent

is the specified value

math.log(math.e) 1 Returns the natural (base e) logarithm of a specified

value

math.log10(10) 1 Returns the base 10 logarithm of a specified value

math.exp(1) 2.71828... Returns e raised to the specified power

math.pow(2,3) 8 Returns a value raised to the specified power

math.sqrt(81) 9 Returns the square root of a specified value

Page 41: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

41 of 43

VB Expressions: Logic Emphasized values can be changed to reference the applicable value.

IF(P1.Y>P2.Y,2,3) Used in a VB Expression, returns a value depending on

whether the condition (P1.Y>P2.Y) is true (value of 2) or

false (value of 3)

P1.Y>P2.Y A condition that returns true if P1.Y is greater than P2.Y

P1.Y>=P2.Y A condition that returns true if P1.Y is greater than or

equal to P2.Y

P1.Y<P2.Y A condition that returns true if P1.Y is less than P2.Y

P1.Y<=P2.Y A condition that returns true if P1.Y is less than or equal

to P2.Y

P1.Y=P2.Y A condition that returns true if P1.Y is equal to P2.Y

P1.Y<>P2.Y A condition that returns true if P1.Y is not equal to P2.Y

(P1.Y>P2.Y)AND(P2.X>P3.X) A condition that returns true if both the condition

(P1.Y>P2.Y) AND the condition (P2.x>P3.X) are true

(P1.Y>P2.Y)OR(P2.X>P3.X) A condition that returns true as long as either the

condition (P1.Y>P2.Y) OR the condition (P2.x>P3.X) is

true

(P1.Y>P2.Y)XOR(P2.X>P3.X) A condition that returns true if only one of the two

conditions (P1.Y>P2.Y), (P2.x>P3.X) is true (if both are

true or both are false, then false is returned)

VB Expressions: Subassembly Composer Application Programming Interface

(API) Functions Emphasized values can be changed to reference the applicable element.

Points and Auxiliary Points Class

P1.X Horizontal distance from point P1 to Origin

P1.Y Vertical distance from point P1 to Origin

P1.Offset Horizontal distance from point P1 to assembly baseline

P1.Elevation Elevation of point P1 relative to 0

P1.DistanceTo(“P2”) Distance from point P1 to point P2 (Always positive)

P1.SlopeTo(“P2”) Slope from point P1 to point P2 (Upward = positive,

Downward = Negative)

P1.IsValid Point P1 assigned and valid to use (True/False)

P1.DistanceToSurface(SurfaceTarget) Vertical distance from point P1 to SurfaceTarget (point

above = positive, point below = negative)

Page 42: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

42 of 43

Links and Auxiliary Links Class

L1.Slope Slope of link L1

L1.Length Length of link L1 (Always positive)

L1.Xlength Horizontal distance between start to end of link L1

(Always positive)

L1.Ylength Vertical distance between start to end of link L1

(Always positive)

L1.StartPoint A point located at the start of link L1 (Can be used in

API Functions for P1 Class)

L1.EndPoint A point located at the end of link L1 (Can be used in

API Functions for P1 Class)

L1.MaxY Maximum Y elevation from a link‟s points

L1.MinY Get the minimum Y elevation from a link‟s points

L1.MaxInterceptY(slope) Apply the highest intercept of a given link‟s points to

the start of another link

L1.MinInterceptY(slope) Apply the lowest intercept of a given link‟s points to the

start of another link

L1.LinearRegressionSlope Slope calculated as a linear regression on the points in

a link to find the best fit slope between all of them

L1.LinearRegressionInterceptY The Y value of the linear regression link

L1.IsValid Link L1 is assigned and valid to use (True/False)

L1.HasIntersection(“L2”)

L1.HasIntersection(“L2”, true, true)

L1 and L2 have an intersection, second input is a

Boolean defining whether to extend L1 with default of

false, third input is a boolean defining whether to

extend L2 with default of false (True/False)

Offset Target Class

OffsetTarget.IsValid OffsetTarget is assigned and valid to use (True/False)

OffsetTarget.Offset Horizontal distance from OffsetTarget to assembly

baseline

Elevation Target Class

ElevationTarget.IsValid ElevationTarget is assigned and valid to use

(True/False)

ElevationTarget.Elevation Vertical distance from ElevationTarget to assembly

baseline

Surface Target Class

SurfaceTarget.IsValid SurfaceTarget is assigned and valid to use

(True/False)

Page 43: Create Subassemblies That Think Outside the Box …aucache.autodesk.com/au2011/sessions/4252/class_handouts/v3_CI4252...Create Subassemblies That Think Outside the Box With Subassembly

Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®

43 of 43

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