+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Dec 2005
    Location
    Chicago, IL
    Posts
    39

    Default Trailing zeros in table formulas....

    Registered forum members do not see this ad.

    This is pretty straight forward, when I create a formula in a table that say multiples 10 by 1.2 (10x1.2) the result is 12.000000. How can I get rid of the unnecessary trailing zeros? TIA!

  2. #2
    Super Member David Bethel's Avatar
    Discipline
    Multi-disciplinary
    David Bethel's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Commercial Food Service
    Using
    AutoCAD pre 2000
    Join Date
    Dec 2003
    Location
    Newport News, Virginia
    Posts
    1,926

    Default

    Look into the sysvar DIMZIN. It controls leading and trailing zeros when using the (rtos) function. Also the ( rtos) has a control value for decimal precision. -David
    R12 (Dos) - A2K

  3. #3
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Dec 2005
    Location
    Chicago, IL
    Posts
    39

    Default

    Thanks David, unfortunately dimzim only works on dimensions so it had no effect on the formulas in my table.

    Edit: I shouldn't say that it only works on dimensions, I don't know that for sure, but in my drawing it only worked on dimensions.

  4. #4
    Super Member David Bethel's Avatar
    Discipline
    Multi-disciplinary
    David Bethel's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Commercial Food Service
    Using
    AutoCAD pre 2000
    Join Date
    Dec 2003
    Location
    Newport News, Virginia
    Posts
    1,926

    Default

    No, DIMZIN controls real-to-string conversions.

    Controls the suppression of zeros in the primary unit value. DIMZIN stores this value when you enter it on the command line or set it under Primary Units in the Annotation dialog box. DIMZIN values 0–3 affect feet-and-inch dimensions only.

    0 Suppresses zero feet and precisely zero inches
    1 Includes zero feet and precisely zero inches
    2 Includes zero feet and suppresses zero inches
    3 Includes zero inches and suppresses zero feet
    4 Suppresses leading zeros in decimal dimensions (for example, 0.5000 becomes .5000)
    8 Suppresses trailing zeros in decimal dimensions (for example, 12.5000 becomes 12.5)
    12 Suppresses both leading and trailing zeros (for example, 0.5000 becomes 0.5)

    DIMZIN also affects real-to-string conversions performed by the AutoLISP rtos and angtos functions.
    -David
    R12 (Dos) - A2K

  5. #5
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Dec 2005
    Location
    Chicago, IL
    Posts
    39

    Default

    Ya I read that also, that's why I edited my post, but never the less it didn't have any affect on the formulas in my tables.

    "set it under Primary Units in the Annotation dialog box" not sure this applies to tables, or if it does, I don't know how to apply it. Setting DIMZIN to 8 or 12 on the command line has no effect on the formula results in my tables even if I reinput the data so it recalculates.

    I thought there was some way to control this using the formula itself but I haven't be able to find any information on that.

    Anything else come to mind on how to possily tackle this issue? And again, thanks for the help!

  6. #6
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Dec 2005
    Location
    Chicago, IL
    Posts
    39

    Default

    Bump....

    Unfortunatly I still don't have a solution for this problem and it kinda makes these great self calculating schedules not so, urr, great.

  7. #7
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Dec 2005
    Location
    Chicago, IL
    Posts
    39

    Default

    Registered forum members do not see this ad.

    Wow, just when I go and bump this post, I figuer it out for myself. For anyone who comes across this in the future, I'll go ahead and answer my own question.

    If you add a formula to a table, that cell becomes a field. You can edit the field by higlighting the cell, right click, and select "edit field". The field dialog box will allow you to set the format and precision, and if you click the field format button it will allow you to turn off leading and trailing zeros.

    I guess you just gotta dig a little deeper sometimes, or prey for a slow day that allows you to actually take some time to really look for an answer.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts