Author Topic: Control Trailing Zeros in Civil 3D Contour Labels  (Read 10460 times)

0 Members and 1 Guest are viewing this topic.

caddcop

  • Guest
Control Trailing Zeros in Civil 3D Contour Labels
« on: December 16, 2013, 08:47:28 PM »
Is there any way to have a contour label style that truncates trailing zeros? I tried a bunch of different expressions, but there was no joy in Mudville.
We are working a metric project and the Project Manager wants 0.25 spacing for minor contours and 2 M spacing on major contours. The result is there are some labels ending in .50, some ending in .00 (odd minor), some ending in .25 and .75 and some with no decimal (even major).

And while I'm at it, what are user contours and how does one use them?

sdunn

  • Newt
  • Posts: 90
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #1 on: December 17, 2013, 12:16:12 PM »
You need to change the precision of the elevation label style.  Right click on the style as shown and choose edit.
Once in the editor choose the layout tab and then select the component you want to edit. 


Select the contents property and click the button to edit the contents. 
Highlight the field on the right, change the precision on the left and then click the arrow button to update the field. 
Click ok to exit.

caddcop

  • Guest
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #2 on: December 17, 2013, 07:24:27 PM »
I need to drop one zero on some labels and two zeros on other labels and have some that need to retain 2 decimal places. This cannot be done using the simple precision setting.
And since some whole numbers are still minor contours, even a separate setting for major contours leaves some contours with two trailing zeros.

sdunn

  • Newt
  • Posts: 90
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #3 on: December 18, 2013, 09:44:48 AM »
You could still do this with styles, I think.  The attached image shows major spacing at 2 feet and minor at .25 feet.  If this isn't what you are looking for, can you post a drawing or image of what you need done manually?

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #4 on: December 18, 2013, 10:06:28 AM »
Stacy, I take it they don't want to see the 649.00 or 649.50, instead these should read 649 & 649.5

sdunn

  • Newt
  • Posts: 90
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #5 on: December 18, 2013, 10:19:30 AM »
edit2

I have attached a drawing showing how to do this with a label style that has 4 components and a few expressions.

These expressions check for the elevation of the surface and set the text height to something visible if true, otherwise they are set to a very small height that won't be seen when plotted.  These expressions are added to the contour label style section.

if({Surface Elevation}-(TRUNC({Surface Elevation}))=.5,0.01,0.0000004)

if({Surface Elevation}-(TRUNC({Surface Elevation}))=.25,0.01,0.000004)

if({Surface Elevation}-(TRUNC({Surface Elevation}))=.75,0.01,0.000004)

if({Surface Elevation}-(TRUNC({Surface Elevation}))=0,0.01,0.000004)

« Last Edit: December 18, 2013, 11:13:41 AM by sdunn »

sdunn

  • Newt
  • Posts: 90
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #6 on: December 18, 2013, 11:14:38 AM »
Attached drawing example

caddcop

  • Guest
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #7 on: December 20, 2013, 10:39:21 PM »
 :lol: When I am back in the office, I will have to try this.
When I looked at expressions, I was hoping that they could return a string or a formatted number. But alas, there are limits.
I guess there is always the Wish List!
As powerful as these labels are, I guess we can still find limitations.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #8 on: May 05, 2014, 03:22:45 PM »
I am trying to do something similar to this, but to decide whether to show it to the nearest foot or tenth. Everything works fine (expression wise), but I put in 0.01 for my text height (confused why it shouldn't be 0.1), but it's putting my text in at 0.12 times the scale, rather than 0.1.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #9 on: May 05, 2014, 03:27:57 PM »
Ok, instead of using 0.01, I used (1/120) and it works.
Not sure why it goes by tenths when you just plug in a value, but by inches when using an expression.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Dent Cermak

  • Guest
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #10 on: May 12, 2014, 01:55:58 PM »
The use of the terms "major" and "minor". 0.25 "minors"? 2 "majors"? Alas, the "Dumbing down of America" at its best. "We don't need no stinking standards!!"
Get pizzed all you want guys, but "Whoop!! Dere it is!!"

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #11 on: May 12, 2014, 02:26:23 PM »
The use of the terms "major" and "minor". 0.25 "minors"? 2 "majors"? Alas, the "Dumbing down of America" at its best. "We don't need no stinking standards!!"
Get pizzed all you want guys, but "Whoop!! Dere it is!!"
Autodesk has had it wrong for so long that some think it is now right.


Intermediate Contour Interval. These lines have no numbers. They appear between index contour line which have numbers.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Dent Cermak

  • Guest
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #12 on: May 12, 2014, 06:55:45 PM »
Refreshing to hear the correct terms.
AutoCAD is built for and by  Archi's and they have no clue about contours.
How many here know what a depression contour is and how to depict it on a map? Very few. Rarely see then on topos by "experts".
I even had one "expert" tell me to re-plot his drawing because the ink smeared or something on some of the contours. Gave him the Bohemian Hand Salute and carried on.

cadtag

  • Swamp Rat
  • Posts: 1152
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #13 on: May 12, 2014, 08:08:04 PM »
The use of the terms "major" and "minor". 0.25 "minors"? 2 "majors"? Alas, the "Dumbing down of America" at its best. "We don't need no stinking standards!!"
Get pizzed all you want guys, but "Whoop!! Dere it is!!"
Autodesk has had it wrong for so long that some think it is now right.


Intermediate Contour Interval. These lines have no numbers. They appear between index contour line which have numbers.

The problem being that over half my plans would only show one labeled contour (or none) if I followed that process
The only thing more dangerous to the liberty of a free people than big government is big business

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Control Trailing Zeros in Civil 3D Contour Labels
« Reply #14 on: May 12, 2014, 08:47:32 PM »
OR change the contour interval so that you have more Index Contours.....

It's a function of the interval.

ETA

I've set plans where the Contour Interval was 0.5'
With Intermediate Contours at 0.1'

Plenty of contour lines with labels on them.
« Last Edit: May 12, 2014, 09:16:50 PM by mjfarrell »
Be your Best


Michael Farrell
http://primeservicesglobal.com/