• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD Civil 3D

    Reply
    Active Contributor
    normans
    Posts: 41
    Registered: ‎03-15-2011
    Accepted Solution

    Rounding of values

    230 Views, 8 Replies
    12-10-2012 03:08 PM

    Perhaps this is an easy one, if there are any? C3D 2012.

     

    I have 2 surfaces that I am sampling and have the bands depicted in the attached. I would like to have all bands with 1 digit of precision and the values in the Cover Depth band add up. The Cover Depth is supposed to be subtracting the two but is often off by one digit. I have tried changing the rounding options in C3D but there is always disagreement between the data in the bands. 

     

    I tried searching for this issue to no avail. Perhaps I need to have an expression to do the rounding is what one case eluded to. Seems that C3D may use a type of rounding that rounds to the nearest even number?

    Civil 3D 2013 SP 1
    Dell Precision T5600
    Win 7 Professional 64 bit
    Intel Xeon @ 2.0 GHz
    16 GB RAM :smileywink:
    Please use plain text.
    *Expert Elite*
    Joe-Bouza
    Posts: 3,321
    Registered: ‎12-15-2008

    Re: Rounding of values

    12-10-2012 07:20 PM in reply to: normans

    When you set the precision of the data band internally the decimals go on causing the funny math. Try round() in the label styles and expression for the data band

     

     

    Thank you

    Joseph D. Bouza, P.E. (one of 'THOSE' People) Civil 3D 2012 & 2013
    HP Z210 Workstation
    Intel Xeon CPU E31240 @ 3.30 Hz
    12 GB Ram

    Note: Its all Resistentialism, so keep calm and carry on


    64 Bit Win7 OS
    Please use plain text.
    *Expert Elite*
    BrianHailey
    Posts: 2,398
    Registered: ‎04-27-2005

    Re: Rounding of values

    12-10-2012 08:58 PM in reply to: normans

    I don't think you can add expressions to section view bands. Hopefully I'm wrong and someone will correct me.

    Please use plain text.
    *Expert Elite*
    Joe-Bouza
    Posts: 3,321
    Registered: ‎12-15-2008

    Re: Rounding of values

    12-11-2012 04:47 AM in reply to: BrianHailey

    Maybe not. I guess I guessed wrong. The expression builder is there but I cant figure out what function can round the decimal? they all seem to round, ciel, trunc to the nearest integer

     

    sect-expression.PNG

    Thank you

    Joseph D. Bouza, P.E. (one of 'THOSE' People) Civil 3D 2012 & 2013
    HP Z210 Workstation
    Intel Xeon CPU E31240 @ 3.30 Hz
    12 GB Ram

    Note: Its all Resistentialism, so keep calm and carry on


    64 Bit Win7 OS
    Please use plain text.
    Valued Mentor
    fcernst
    Posts: 497
    Registered: ‎01-07-2011

    Re: Rounding of values

    12-11-2012 06:15 AM in reply to: Joe-Bouza

    To round to the nearest tenth:

     

    ROUND(X/0.1) *0.1

    Ernst Engineering
    Fred Ernst, PE
    C3D 2013 SP1, C3D 2014
    W7x64; i7 8gb; Radeon HD 5700
    www.ernstengineering.com
    Please use plain text.
    *Expert Elite*
    Joe-Bouza
    Posts: 3,321
    Registered: ‎12-15-2008

    Re: Rounding of values

    12-11-2012 07:37 AM in reply to: fcernst

    Thanks Fred! Thats too easy

    Thank you

    Joseph D. Bouza, P.E. (one of 'THOSE' People) Civil 3D 2012 & 2013
    HP Z210 Workstation
    Intel Xeon CPU E31240 @ 3.30 Hz
    12 GB Ram

    Note: Its all Resistentialism, so keep calm and carry on


    64 Bit Win7 OS
    Please use plain text.
    Active Contributor
    normans
    Posts: 41
    Registered: ‎03-15-2011

    Re: Rounding of values

    12-11-2012 09:27 AM in reply to: normans

    I am following your line of thought from your much appreciated suggestions. I'm not quite there yet though.

     

    BH - I've only read about the use of expressions, not used them yet, but I'm willing. I'm wondering if what you said is true - that you can't use expressions in Data Bands?

     

    Perhaps I will just add a note to the effect that internal rounding is causing the issue for now, but I would really like to resolve this as I am sure that it will aid me in the future.

     

    Thanks again.

     

     

     

     

    Civil 3D 2013 SP 1
    Dell Precision T5600
    Win 7 Professional 64 bit
    Intel Xeon @ 2.0 GHz
    16 GB RAM :smileywink:
    Please use plain text.
    *Expert Elite*
    Joe-Bouza
    Posts: 3,321
    Registered: ‎12-15-2008

    Re: Rounding of values

    12-11-2012 09:42 AM in reply to: normans

    Brian is correct.

     

    I jumped the gun on the labelstyle expressions. The section data node does not have an expression node

     

    section data.PNG

    Thank you

    Joseph D. Bouza, P.E. (one of 'THOSE' People) Civil 3D 2012 & 2013
    HP Z210 Workstation
    Intel Xeon CPU E31240 @ 3.30 Hz
    12 GB Ram

    Note: Its all Resistentialism, so keep calm and carry on


    64 Bit Win7 OS
    Please use plain text.
    *Expert Elite*
    BrianHailey
    Posts: 2,398
    Registered: ‎04-27-2005

    Re: Rounding of values

    12-11-2012 02:56 PM in reply to: normans

    This is one of my pet peeves with reviewers.When doing things by hand, you calculate the rounded value minus the rounded value and that's not very accurate. You want the actual value minus the actual value. If you label an elevation as 100.01, is that actually at that elevation? Not necessarily. It's at a number that ROUNDS to that value! Reviewers need to understand this concept when reviewing plans. Even though the drawing says it's 100.01, it not EXACTLTY 100.01!

     

    For example, what is 100-90? Well, it's somewhere between 9 and 11. Any number between 9 and 11 is a solution to this equation. In other words, it's anywhere between 100.5-89.5 and 99.5-90.5. Round all numbers to the nearest 1 and they are both 100-90.

     

    Thank you for listening, I'll end my rant now.

    Please use plain text.