Round Z value

Discussion in 'AutoCAD' started by antoniomiranda, Jan 19, 2004.

  1. Hello,

    I've many lines and each line have a different Z value:

    1) 173.998 meters
    2) 175.988 m
    3) 177.999 m, ......

    It's possible to round each line to a Integer Z value?

    Like:

    1) 174 meters
    2) 176 m
    3) 178 m, ...

    the difference in Z value between this lines is contant, in this case 2 meters.

    Best regards,
    António miranda
     
    antoniomiranda, Jan 19, 2004
    #1
  2. antoniomiranda

    Rakesh Rao Guest

    Hello António,

    You could write a Lisp or VBA program to do this or it might just be
    simpler to import this into a spreadsheet and round off the values in
    the cells.

    Regards
    Rakesh


    --

    AutoCAD customization for Engineering/Mapping/GIS
    Get GeoTools @ http://www.4d-technologies.com/geotools
    Build MyGeoTools @ http://www.4d-technologies.com/geotools/my_geotools.htm
    FREE downloads : http://www.4d-technologies.com/techcenter
    </PRE>
     
    Rakesh Rao, Jan 19, 2004
    #2
  3. antoniomiranda

    Mark Propst Guest

    Unfortunately I'm not sure where I got these rounding functions, maybe
    Veign?
    www.veign.com
    ??? apologies if that attribution is not correct
    ' SymArith Symmetric arithmetic rounding - rounds .5 away from 0.
    ' Same as AsymArith for positive numbers.
    ' Similar to Excel Worksheet Round function.
    Function SymArith(ByVal X As Double, _
    Optional ByVal Factor As Double = 1) As Double
    SymArith = Fix(X * Factor + 0.5 * Sgn(X)) / Factor
    ' Alternately:
    ' SymArith = Abs(AsymArith(X, Factor)) * Sgn(X)
    End Function

    Hello,

    I've many lines and each line have a different Z value:
     
    Mark Propst, Jan 19, 2004
    #3
  4. antoniomiranda

    Mark Propst Guest

    Mark Propst, Jan 19, 2004
    #4
  5. Many thaks.
     
    antoniomiranda, Jan 19, 2004
    #5
  6. antoniomiranda

    Mark Propst Guest

    You're welcome!
    :)~
     
    Mark Propst, Jan 19, 2004
    #6
  7. Hello,

    If you find the code to do that, tell me please!

    I don't know how can i do that :-(

    Thank's
     
    antoniomiranda, Jan 19, 2004
    #7
  8. antoniomiranda

    Mark Propst Guest

    code to do what?
     
    Mark Propst, Jan 20, 2004
    #8
  9. Hello,

    The code to round each line of dwg drawing, please

    Best regards,
    Antonio Miranda

    P.S.- I'm new in this world of VBA.
     
    antoniomiranda, Jan 20, 2004
    #9
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.