Wicked Cool Stuff
Dominick Gallegos, Civil 3D Technical Marketing Manager for Autodesk, shares his unique perspective and ideas on the functionality and use of Civil 3D for a range of different project types.
About DominickLatest Post
- posted 10/24/06 by Anthony Governanti Peter Funk strikes again
- For those of you that don't know who he is, Peter, among other things, is the newest Product Manager for Civil 3D. He has a programming background, and before the recent switch to his current title, was the API Product Manager for Civil 3D. Anyway, he's too smart for his own good sometimes, but it's great for us, because we can reap the rewards.
This tip is solely Peter's doing, and I can neither confirm nor deny any of the credit!
Displaying cut/fill labels with appropriate colors.

View image
Here is the end result of this tip. Note that the cut volume labels are red, and the fills are green, and they are each inserted on a grid.
Here is how to do it:
1. Create a volume surface that represents the two surfaces you are comparing
2. Create an expression for Surface Spot Elevation labels
- Name it "Negative Value"
- Use this expression; -1 * {Surface Elevation}

View image
This expression will take a value, and multiply it by negative one, changing a positive integer into a negative one, or for this case, taking a negative and turning it into a positive. The ole double negative trick!
3. Create a new Surface label style for Spot Elevation Called "Cut Fill"
- Rename the label Component to "fill"
- Change its color to Green
- Modify the Surface Elevation label component
- Edit the text component and change the Sign Modifier to "Hide Negative Value"

View image
4. Make a new component for the Cut value
- Copy the Fill text component
- Rename to Cut
- Change the color to Red
- Edit the Text Component, and replace with the Negative Value expression
- Change the Sign Modifier to "Hide Negative Value"

View image
Now add Surface labels to the Volume surface on a grid, using the Cut Fill style. All the spot elevation in a cut area (the negative values from the volume surface) will be labeled with the Red label, and all the spot elevations with a fill area (where the volume surface is positive) will label with the green text. Because we chose to hide the negative values, and we used an expression to turn a negative into a positive (the cut), it automatically display the appropriate spot elevation.

View image
Pretty cool huh? Thank You Peter!
I've added a drawing with the expression and label style to the community site here.
I removed the file here so that you can get it from the content sharing section of the community. If you aren't a member yet, please go here to sign up.
Till next time,
Cheers,
AG

User Comments
Well done, Peter, and thanks for documenting this, Anthony. For what little it's worth, a similar thing can be done in the Profile Bands. In there it's just a matter of creating a label component for <Profile1-Profile2> in one colour and one for <Profile2-Profile1> in another and hiding the negative values.
However, we went away from that because all the results are then positive. What happens when the plan is photocopied to give to the grader or excavator driver? No colours, no negative sign, no idea of whether it's cut of fill. And putting a minus sign or pair of brackets in the component doesn't do the job: the minus sign always displays, regardless of whether the value is hidden or not.
So, is there a way to use colours AND a negative sign of some kind at the same time?
Sorry to be picking holes in an otherwise excellent workaround; it's a most unfortunate talent of mine.
Trevor
Posted 10/26/2006 1:12 AM by Trevor Bernhard
Peter,
You are too smart!
Posted 10/26/2006 10:20 AM by Shawnita Sterett
Sorry Peter, I've never used the plan view labels as you developed here, so I was assuming they'd work similarly to the Profile View Band, where both sets of data always display but the "Hide Value" setting means the values never overlap. In the Profile Band, placing a minus sign in the Cut component label produces a minus sign at every station, including through the middle of Fill values.
Sorry for the red herring.
Trevor
Posted 10/26/2006 9:37 PM by Trevor Bernhard
I find Peter Funk to be incredibly intriguing.
Posted 11/11/2006 3:39 AM by Dana Probert
how can i change the precision of the labels?? it displays 3 decimal places as it is, yet i can tfind anywhere which actually changes it to two which i want. thanks
Alex
Posted 4/18/2007 12:38 AM by Alex Munro
use colours AND a negative sign of some kind at the same time can not realize.
Posted 1/17/2008 2:38 AM by dai feiling
p3 change to p2 can change the precision of the labels
Posted 1/17/2008 2:43 AM by dai feiling