I hate Surface analysis – how to Automate them in Civil 3d

Creating cut/fill diagrams is often a pain in the neck. There isn’t a great way to share the schemes you come up with, creating them in the first place is a pain. There are several default schemes, but you can’t modify them! Don’t believe me – check the help! Editing color scheme for surface analysis in Civil 3D (autodesk.com) The title should really say you can’t do this! There is a tool in the country kits to share these, but it isn’t optimal.

Lets start by automating the creation of slope arrow analysis. I typically use this table below. I have included the reasoning for each color. Its nice to setup the Dynamo script with your own company standards, these become very useful when reviewing surfaces.

Take a look at the youtube video below to walk you through the process.

Here is a link to the Dynamo Script for that one: https://drive.google.com/file/d/1UzcSLlsMEwZ5P3rpotEauLqISVB5D1q1/view?usp=drive_link

Next is elevation analysis for TIN volume surfaces. This is always a major time suck as it takes time to set this up and then you can’t re-use that again. It says so in the help document! Editing color scheme for surface analysis in Civil 3D (autodesk.com)

Here is a link for the Dynamo script for this one: https://drive.google.com/file/d/1oJnTaruJq8FhiFl1yNJ2S-xV_lcoPvrC/view?usp=drive_link

These scripts are only possible with the excellent Camber Package for Dyanmo and Civil 3d. You will need to download this package, it will prompt you to do this when you open the script in dynamo. Here is more information on how to do this: https://primer.dynamobim.org/en/11_Packages/11-1_Introduction.html

If you improve on these scripts, please let me know. I’m always looking for ways to make things better!

Civil 3d My surface is ignoring the feature lines!

I see this issue from time to time in Civil 3d. A surface is created, but when updating the feature lines, it isn’t always represented in the surface.

The issue is usually too many edits in the file. It makes it difficult to see what the feature lines are doing to the surface, meaning people can update the feature lines, but those changes are not reflected in the surface.

In the video linked below, I have demonstrated this, along with a couple other surface best practices.

I also demonstrate a dynamo script I use for surface analysis. If you would like to try it out, it can be downloaded here: https://drive.google.com/file/d/1LYvBJEzruKHih1CVQujeb34ZtU0bJlen/view?usp=drive_link

Civil 3d 2024 Hero!

With a large number of us working remote since the pandemic, there are some slowdowns that can happen. One issue I have seen in my organization is the time it takes to set the working folder when working through the VPN. If you are using a working folder structure that contains many folders to index, this can take a long time.

I will agree that my organizations working folder setup is suboptimal. With a project # of 12562, we set the working folder to P:\12000, requiring Civil 3d to index over 1,000 folders. With everyone in the office this took about 10 seconds to execute.

Working at home through the VPN this could take as long as 20 minutes. Here is a really boring video!

Enter the hero of our story, the new feature in Civil 3d 2024 ENABLEDSMULTITHREAD!

Setting ENABLEDSMULTITHREAD to ON had reduced this from about 20 minutes to about 10 seconds. That’s what I call a productivity boost!

9x faster Tab Switching in Civil 3d 2024 – NO!

I did this post last week where I tested the claim of up to 9x faster tab switching with AutoCAD 2024. My thought is this would be great for my Civil 3d users who use a lot of tabs. Faster is always better, right?

Unfortunately this speed increase did not transfer from AutoCAD 2024 to Civil 3d 2024. I suspect this has to do with the fact that Civil 3d regenerates object very differently than straight AutoCAD.

The good news is Civil 3d 2024 managed to do this about 11% faster over 5 trials with Civil 3d 2024 always coming out faster than the 2022 version.

I also tested to see if this speed increase in tab switching also applies to publishing the same 50 sheet drawing set. Unfortunately, the answer is no to that (even in AutoCAD). I suspect whatever change was made to speed up tab switching was not applied to the publishing code.

Here is a video of one of the runs.

9X faster switching between layout tabs with Autocad 2024 – Lets test that

“Up to 9x faster switching between layout tabs compared to AutoCAD 2023” Lets test that. Source: Welcome AutoCAD 2024: Quickly Collaborate, Enhance Your Productivity, and Experience New Machine Learning Features

I had a drawing with over 50 layout tabs so I bashed together this code to switch between 50 layout tabs and time the results. This code is specific for these drawings. You can see the code at the bottom of this post.

Here we are testing performance between 2022 (left) and 2024 (right).

Video has no sound.

My experiments found it being significantly faster at about 4-5x faster. I wasn’t seeing 9x speed improvement, and would be curious what changes could be made to achieve that.

Code below. This is relying on knowing the names of the layout tabs.

(defun c:bm (/ );time_start current_tab next_tab time_end time_ellapsed )
(setvar “ctab” “100”)
(setq time_start (getvar “millisecs”))
(setq current_tab 100)

(repeat 50
(setq current_tab (+ 1 current_tab))
(setq next_tab (itoa current_tab))
(setvar “ctab” next_tab)
; (command “zoom” “Extents”)
(princ next_tab)
)
(setq time_end (getvar “millisecs”))
(setq time_ellapsed (/ (- time_end time_start) 1000.))
(princ time_ellapsed)
(alert (strcat “Ellapsed Time to switch 50 layout tabs\n\n”(rtos time_ellapsed 2 2)”Seconds”))
(princ)

)

I can see clearly now!

I think everyone who learns to edit Civil 3d styles, learns to squint at the screen a bit because it is so hard to see clearly the current parameters when you are editing the Civil 3d styles.  We may be creating a generation of Engineers and CAD managers with bad vision due to this.

But there is an option to fix this, it’s a Windows feature called clear type.  We need to turn that off.  Press Start, and type in ‘CLEAR’ and select Adjust Cleartype Text.

You can also hold the Windows key on your keboard, press ‘R’, and type in CTTUNE.

It will come up with several prompts depending on how many monitors you have and ask you a series of “which one looks better” questions.

Look how much easier this is to read!

Lets compare this vs the original version.  Big difference.

Reviewing Civil 3d Surfaces – Part 2

I often see users new to grading with Civil 3d make the same errors reviewing surfaces. Here we are going to continue our series and show you a few shortcuts to help you review surfaces faster.

I see this often with new users, they want to check the grades, and do it by copying a grade label all over the place. To review these they need to review each number. Lets supercharge this and talk about surface analysis!

Select the surface, right click and select Surface Properties.

Setup the desired # of surface analysis. I usually use this scheme:

I usually do this for the following reasons. I want to flag any slope under 0.50% as too flat to drain. Often I may want to increase this range. 0.50-1.50% I also want to check out. 1.5%-2% is flagged so we can check for any issues with ADA cross-slope. 2-8.33% is acceptable for ADA longitudinally. 50%+ I want to check for any too-steep slopes.

To get these to display, edit your surface style and make sure Slope Arrows is on (visible).

Now I can review my surface slopes by looking at the surface.

One issue you can have is the slope arrows are too/big or small.

You can change the size of the slope arrow by editing the style.

Adjust the slope arrow length as needed.

If you are printing this for review by your team, you can add a surface legend table

After selecting ‘Add Surface Legend Table’ and selecting your surface, it will ask what type of table you need. Select A for Slope Arrows. It will ask if you want a dynamic or static table.

Tin Lines Make Sense out of Chaos.

When reviewing the slope arrows, sometimes making sense out of them can be difficult. Turning on the tin lines helps make sense out of chaos.

This will conclude part 2 of this series. I will post part 3 sometime after Autodesk University in New Orleans. Hope to see you there.

To read part 1, visit this link: http://c3dk.com/2022/09/06/techniques-for-reviewing-civil-3d-surfaces-part-1/

Techniques for reviewing Civil 3d Surfaces, Part 1

Labels lie all the time in Civil 3d. You need to be aware of HOW they lie when you review drawings

I find a lot of new Civil 3d users do a good job of understanding the Surface Creation tools.  The available tools to review surfaces and the problems that can result are less understood. 

In this series, I am going to go through the tips I have for reviewing surfaces. There will be some good tips both for the newer Civil 3d user and tips experienced users can use to review drawings. Most of the issues in these posts come from actual drawings, not ones I have created to demonstrate these issues.

Tip #1, increase contour interval.
Increasing the contour interval can quickly reveal issues with the surface.  In the example image below left, that contour looks a bit funky.  Once I increase the contour interval the issue is quickly revealed.

To increase the contour interval, Select the surface, right click and select ‘Edit Surface Style’.  Go to the surface style, contour tab and increase 10x.

Here is a similar issue that is revealed with this change.


How Labels Lie

Labels lie all the time in Civil 3d. You need to be aware of HOW they lie when you review drawings. Lets take a look at this example below. Can you see the issue with the slope label below?

Circling it as below probably helped you find it, right?

Reviewing the spot elevations, clearly this isn’t 0.01%. Lets select the label…

We can see here that the grips are going past the breakline. You need to make sure that the grips for two-point labels aren’t crossing breaklines. In this case the slope to the left of the breakline is different than the slope on the right. So it averages these out. Its not good!

Two suggestions here:

First its a good idea not to make your two point grade labels any longer than they need to be. This will help you eliminate the issue like above, cause things are going to move.

Second, before putting your plan into any sort of final state, double check ALL the labels are referring to the correct surface. Select a single label, and then select similar.

Now that I have selected a single label, and select all. I want to verify that all my labels are referencing the correct surface.


That concludes Part 1 of this series. I will post part 2 in a few days. If you have a suggestion, please leave it below in the comments! Thanks!

CAD -> Google Street View

Google street view is a very powerful resource for engineers. Often times it takes some fiddling to find the exact point you want in street view.

I wrote some code to help with the process. What this code does is take the Northing and Easting in your Civil 3d drawing and convert it to Lattitude & Longitude. In order for it to do this you have to have a coordinate zone assigned to your drawing in the Civil 3d Units & Zone Tab. I demonstrate this in the video, but you can also access it by typing in EDITDRAWINGSETTINGS.

Check out the video below, and the code at the bottom of the page. Thanks!

; Written by Brian Strandberg, c3dk.com
; email: hello@c3dk.com
; Transforms coordinates from the X & Y in your drawing
; to Lattitude & Longitude
; then opens google street view at that point.
; code is not fully debugged
; requires a coordinate zone is assigned to your drawing.

(defun c:gsv (/)
(command "UCS" "World")
(if (not (getvar "CGOECS"))()(alert "fail - set coordinate zone first"))
(setq pkpt (getpoint "Select Point to see in Street View"))
(ade_projsetsrc (getvar "CGEOCS"))
(ade_projsetdest "LL84")
(setq cvp (list (car pkpt) (cadr pkpt)))
(setq result (ade_projptforward CVP))
(if (null result)
(alert "\nError in Transformation "))

(setq gsv (strcat "http://maps.google.com/maps?q=&layer=c&cbll=" (rtos (cadr result) 2 8) "," (rtos (car result) 2 8)))

(command "UCS" "P")
(command "browser" gsv)


); close defun