Using Subassembly Composer on the Highway A4 Construction Project
Using Subassembly Composer on the Highway A4 Construction Project
Jordy Brouwers – Geonius
CI2281 This class will provide an in-depth look at using the Autodesk® Subassembly Composer. Learn how to organize your workflow and create complex subassemblies of tunnels, retaining walls, highways, and others with ease. Import and update your subassemblies into AutoCAD® Civil 3D® software, and see the result in your corridor in the complete intelligent model in Autodesk® Navisworks® software. This class uses data and real-life examples of the Highway A4 construction project in The Netherlands.
Learning Objectives
At the end of this class, you will be able to:
- Use Subassembly Composer
- Set up workflows for creating complex subassemblies
- Export custom AutoCAD Civil 3D corridors to Navisworks
- Import and update custom subassemblies in Civil 3D
About the Speaker
Jordy Brouwers began in 1999 as a designer after studying civil engineering. Soon he was acquainted with Land Desktop, and discovered the power of 3D design. In the autumn of 2004, he was one of the first users of AutoCAD® Civil 3D® in Europe. Jordy developed styles, and implemented AutoCAD Civil 3D within his organization. He also gave courses and held different presentations about AutoCAD Civil 3D. Together with other power users, he founded the C3D User Group Benelux ( After his move to Geonius in 2008, he became involved in the development of applications for Civil 3D. At present, Jordy is working with Civil 3D on the Highway A4 construction project in The Netherlands.
1Subassembly Composer introduction
1.1What is Subassembly Composer (SAC) ?
Autodesk Subassembly Composer became available on the Autodesk Subscription website in July 2011. According to this website, Autodesk Subassembly composer (or SAC for short), is the following :
As all of it is very true, SAC is also (in my opinion) the best thing ever happened to corridor modeling in a long time. It is a very powerful tool with capabilities we could only dream of before. Want circular shapes ? Use SAC. Want very complex assemblies (in tunneling, retaining walls, etc)? Use SAC. Want intelligent behavior ? Use SAC. Want slope transitions between different slopes ? Use SAC. Calculating volumes ? SAC. Solid modeling ? SAC.
1.2Where do I get SAC ?
As mentioned above, SAC is available on the Autodesk Subscription Website ( for Civil 3D 2011 and 2012. As of version 2013, SAC is delivered on the DVD.
SAC 2011 / 2012 / SAC 20131.3Some Pros / cons
Although I think SAC is a great add-on to Civil 3D, is has also some disadvantages or features I would like to see in the product.
Pro / Con- Easy to learn to make own subassemblies
- Start with simple SA’s, and make them more complex
- More intelligent than stock SA’s
- Makes a nice combo with Corridor Solids
- SAC Support pack (2011/2012) or SAC itself (2013) has to be installed at other PC’s
- No encryption – like sending out source code
- Not very user friendly on complex SA’s
- No combination with custom .net code
- No Pipe Network targets
1.4What about corridor solids ?
Also available on the Autodesk Subscription website is the Corridor Solids Extraction tool (somewhat ‘hidden’ in the Productivity tools for AutoCAD Civil 3D 2013).
This tool enables you to extract 3D solids from corridor shapes and 3D bodies from corridor links. This can be very useful if you want to export your corridor to Navisworks for example, or you can use it to calculate volumes with the AutoCAD MASSPROP command.
2Use Subassembly Composer
2.1Case 1 – target to multiple surfaces
In this case, we create a subassembly that targets to surface 1 (for example, a designed surface). If that surface doesn’t exist, the SA targets to surface 2 (for example an existing surface). This subassembly can be used, in our example, when connecting a corridor to another corridor.
We could create separate regions with different targets, but I want to have the corridor as ‘clean’ as possible, without a lot of regions. So let’s create a subassembly for this.
2.1.1Create subassembly & specify parameters
Open subassembly composer, save your subassembly to a .PKT file. This file can be imported to Civil 3D.
Normally, we start with a sketch to define what the purpose and behavior of the subassembly should be, including input / output parameters, targets, etc.
In our case, we already know the behavior of the subassembly. Now we can define all the parameters, in the different tabs :
Create a name of the subassembly, and choose wisely. Once you imported the subassembly in Civil 3D, you don’t want to change the name. Otherwise, in case of an update, Civil 3D sees it as a new subassembly, and you have to replace the subassembly manually in your assemblies.
In the Input/Output tab, specify all the input parameters you want to use. In this case, it’s the slope, and the codes. You don’t have to define codes as an input parameter, codes can also be ‘hardcoded’. However, I recommend using input parameters to define codes, so you can easily change them within Civil 3D.
You can specify output parameters, like the length of the slope, if you need them. In this case, we don’t use output parameters.
At the target parameter tab, you specify the targets you want to use. As a type, choose between surface, alignment or profile. In our case we define 2 surfaces. The ‘Name’ is the internal name used by SAC, the DisplayName is used in Civil 3D. For design purposes, we can specify a preciew value. As soon as we specify these targets, we see them in the preview pane :
Next two tabs (superelevation and event viewer) we don’t use at the moment.
2.1.2Create subassembly geometry
Basically, the subassembly exists of 3 different elements, points, links and shapes. SAC introduces a new type of link, the curve.
To create a subassembly, you use the toolbox to define all different elements, and the way they should work together. For example, if I want to create a simple slope, I create a point at the beginning of the slope, and a point at the end (daylight), with a link between them. Nothing complicated. However, to find the endpoint of the slope, I first have to find my target surface.
So for this case, we first make a ‘simple’ slope, using the existing surface as a target. If that works as expected, we will extend our subassembly with more options.
In the preview window, we see a graphical representation of our subassembly. The marker indicates the insertion point of the subassembly in the assembly. In the preview, this insertion point has elevation 0 (zero). The design surface has a preview value of -1, the existing surface of -2.
Let’s start creating our geomertry. Drag and drop a point form the geometry toolbox to your subassembly flowchart. An arrow appears from the Startpoint, indicating the ‘route’ of the flowchart.
In the preview window, you’ll see P1 appear. We just created our first point.
Now we want to create a link to a surface. However, in SAC, links can only be created between 2 points. So, in order to create a link, you have to define a start- and endpoint first. So we create another point, P2, by dragging it into the flowchart.
As you see in the preview, P2 is created on top on P1. Why is that ? Let’s look at the properties of P2 :
In the properties window of P2 (every point number used should be unique) we can define how P2 is created. In this case, P2 is created using a Delta X and Delta Y, from P1. Both have a value of zero, so P2 is on top of P1.
In our case, P2 is created by creating a certain slope to a surface. If we look at the Geometry Type, we have the following options :
We want to use Slope to Surface. As you can see, there are different options to create a point. Furthermore, several targets can be used as an override.
After changing the geometry type, our Geometry Properties change :
As a slope, we use the input parameter called ‘Slope_of_link’, instead of the hardcoded -2.00%. In that way, we will be able to change the slope within Civil 3D. As a surface target, we use the existing surface :
So, point P2 will be created on our surface, right ? Well, if we look at the preview pane, we don’t see P2 :
To see what’s wrong, we can check out the event viewer, now displaying an error message :
So, P2 cannot be created. In this case, I used the slope as it is entered in the parameters. But that is a positive value, and we need a negative value for a slope downwards. You could just put a minus sign in the properties, but if the user enters a negative value in the parameters, things get stuck again.
SAC can use expressions using standard MSDN math functions.(More info : the online help, or at In this case, we convert the ‘slope_of_link’ parameter to an absolute value using math.Abs(Slope_of_link) , and create a negative value out of that function. No matter what the user enters, it’s always converted to a negative slope value.
Now we have created our first link. We complete this subassembly by adding the point and link codes to the assembly.
2.1.3Flowchart (organizing your subassembly).
In SAC, we see a flowchart representing the creating of the subassembly. We can have multiple levels of flowcharts, and these flowcharts will be executed in sequence, e.g. one flowchart is finished before C3D calculates the next flowchart. You can see it as the building blocks of your subassembly. Working with multiple flowcharts is a good practice, to keep your SA structure understandable (not only for you, but also for your colleagues). So, we create a flowchart, called ‘Slope creation’, and move P2 into our newly created flowchart (use cut / paste for this). We always keep P1 as the first element in the flowchart. Finally, recreate or change all the flow arrows, as shown in the image below.
NOTE : To have 1 point & link into a flowchart looks a little bit too much. However, I advise you to do this, to keep your SA as organized as possible. Also, extending you SA with additional points / links / shapes is more flexible this way.
2.1.4Auxiliary geometry
We created a working subassembly. But, at the moment, it always uses the existing surface as a target, so it’s not complete yet. The original plan was, to target to a designed surface, and only if that target can’t be found, the SA should target to an existing surface.
We already added 2 surface targets in the SA properties. Now, we have to determine, which target to use. So, let’s create some geometry, to find out if a target exists, or, more specifically, whether a point can be created or not. In this case, the SA should check if a target to a designed surface can be made, and, if not, a target to the existing surface can be made.
In SAC, we have the ability to use ‘Auxiliary geometry’. You can see this as a kind of ‘hidden’ geometry, inside your subassembly. Auxiliary geometry points or links are not show in Civil 3D, so they are great for trial-and-error, analyze of geometry or can just help you to better understand you subassembly. The drawback of using auxiliary geometry is that it slightly increases creating of the corridor, because of the extra calculation time.
In our subassembly, we create a new flowchart, before the flowchart called ‘link creation’. Be sure to connect the new flowchart with the start point, using the arrow pointing to the top of the flowchart.
Auxiliary geometry works the same way as normal geometry. We create a point AP1 on a slope to surface, the same way we did before. We don’t need the link, so we uncheck the box.
A second point AP2 is created, now we use ‘Design’ as surface target (copy & paste AP1, change the parameters and connect the arrow) :
Now, in this example, both of the targets are found. But what if the designed surface doesn’t exist ? We can simulate that by setting the preview value of the design surface to +1. You can change that in the ‘target parameters’ tab, or click in the preview pane on the surface name, and drag it above P1 :
Now, AP2 isn’t created anymore, because a negative slope, starting at P1, can never reach a surface above the point. The same thing would happen, if a surface doesn’t exist at a corridor sample station. Note also the event viewer :
2.1.5A decision is made
We created a situation, where the slope we already created would be correct: in the absence of AP2. But, if AP2 can be created, the slope should use the designed surface as a target. What we need is the following statement in our subassembly :
IF AP2 exist, THEN use designed surface as target, ELSE use existing surface as target.
Or, in other words :
IFAP2 exists, THEN create slope between P1 and AP2,ELSE create slope between P1 and AP1
We can create IF….THEN…ELSE conditions with ‘decisions’ in the flowchart :
The best place to put the decision would be in the ‘Link creation’ flowchart :
We drag and drop the decision in the flowchart, and connect the arrow. In the properties pane, we need an expression with the outcome ‘False’ or ‘True’.
In the online help system we can find a section ‘API functions’ (sounds like programming, doesn’t it ?). In this section, you find different ‘Classes’, belonging to different elements of the subassembly. Not only points and links, but also some other interesting classes like the Baseline class, which I use in case 2.
API functions are functions, available to use in expression. For example, if I want to use the length of a certain link, I could use L1 class, using the function L8.length to get the length of link L8.
(Keep in mind that in a decision, the outcome should be true or false. So L8.lengthwould result in an error, as L8.length=1 would be correct..)
In this case, we use the IsValidfunction of the P1 class, to check if AP2 exists :
In our flowchart, after processing a ‘normal’ element, the outgoing flow arrow(s) would be followed at all times. At a decision, we have 2 connecting points, one for the ‘true’ condition, and one for the ‘false’ condition. Our original slope targets to the existing surface, so that would be in case of the ‘false’ condition. We connect the outgoing arrow of the ‘false’ condition to the P2 point :
The link is created in this condition, which is the way it should. Our final check : if we lower our design surface again, AP2 is created, and the link should disappear :
The only thing left is to create a slope in this condition, using the design surface as target :
You can think of some variations on this subassembly. A nice one would be to only target to the design surface, if it lies above the existing surface. (HINT : If the Y-value of AP2 is larger than the Y-value of AP1). A very nice variation would be if you can have a yes / no decision in the Civil 3D properties, whether to target to the design surface only if lies above the existing surface, or in all cases (HINT : Use a Yes / No type parameter). If you want to try one of these, you are welcome to send me an e-mail with your result, in case you need any help with them.
2.1.6Import in Civil 3D
So, last thing is to import the subassembly into Civil 3D, using the insert tab :
Attach the subassembly as you always do, and note the parameters in the properties panel :
In the corridor target mapping, we see both surfaces :
After mapping the new assembly, compare the result :
2.2Case 2 – Transition between slopes
A solution to a well-known problem : I have a corridor with 2 different regions with different slopes, and want to create a transition between them :
You could use targets (lines or alignments), but our Belgium friend Bart De Maesschalck of the company DEME came up with a nice solution : Create a custom subassembly for this problem. In this case, I will describe this subassembly.
2.2.1Create subassembly & specify parameters
Start again with saving and naming your subassembly in the Packet Settings tab :
As input we have the following parameters :
- Side – Standard for every subassembly
- Startslope – defines the slope at the begin of the region
- Endslope - defines the slope at the end of the region
- Point & Linkcode definition
Also, this time we use an output parameter. As the slope varies, it could be handy to read out the slope of the current corridor insertion point, for example to determine whether a guardrail has to be placed or not. Just define an output parameter as slope; we’ll use this later.
Just one target surface. Maybe useful : define a possible horizontal target, to use as an override for the calculated slope.
Again, we start with P1 at the origin point. This isn’t common practice in stock subassemblies, but it is very useful when creating surfaces, or adding boundaries to surfaces :
2.2.2Calculating the slope
Before the slope can be created, we have to calculate the slope at a certain station. At the input parameters the begin and end slope are defined. (unfortunately, there is no way to let the subassembly find out these slopes by itself). At the exact middle of the region, the slope would be the average between these slopes. But what about the other stations ? With a little math we can calculate the slope at a certain station by the following formula :
For example, we have a region of 100 units, a begin slope of 50% and end slope of 100%, the slope would be :
At one-fourth of the region :
Does it work when we begin at 100%, and end at 50%, at three-fourth of the region ? Yes, as long as we calculate the SlopeDifference the same way :