Rounding up Dimensions

Hi Don,

 

This is up your alley. I am sorry but I am just being lazy. I've scoured the help and dimension settings box, but I cannot find how to round up a dimension style to the nearest 5mm - as the ones do in the attached file. Please tell me where to look. There are too many settings. Many thanks.

 

Lincoln

Dimensions to the nearest 5.dwg
Parents
  • It's not your fault not finding the setting, Lincoln.  This setting is not added to GUI yet.  A workaround is to use a not so friendly keyin to set the unit roundoff value for active dimension style:

    mdl load calculat; calculator mdlDimStyle_setDoubleProp(mdlDimStyle_getActive(), 5.0, 1083)

    where 5.0 is the 5mm unit roundoff.  After this keyin, when you place a new dimension, you will get the roundoff effect.  It does not, however, change an existing dimension style.  It only changes active style.

    HTH,

    Don



  • Suffering succotash! I'm glad I asked.

    Thanks Don.

    Lincoln

     

    By the way, what I really wanted to do is make this dimension style (which came from someone else) round off to the nearest millimetre instead of 5mm, and keep all the other dimension settings. I copied the style then applied your keyin with 1.0 instead of 5.0, and then placed some dimensions.

    These new dimensions would work as anticipated after saving the file. Then I used the Change Dimension style tool to modify the dimensions already placed with the 5mm tolerance to the 1mm tolerance style. They looked fine, but after saving the file they would changed back to the 5mm tolerance, even though they say the are of the new dimension style. It seems that I have to re-dimension all the dimensions I want to change using the new style; I cannot just change the style. Is this correct?

    Does your head hurt after a day at work?

    Thanks in advance.

     

    Lincoln

     

  • Lincoln,

    You need another workaround: set MS_DWG_DIMENSION_ROUNDOFF=on, then what you do will work.  With that set, you can probably take a shorter approach for what you need: activate the dimension style you want to permanently change, use the keyin to change roundoff to 1mm, save style which will also change all dimensions that use this style, save file settings followed by file save (or saveas).  The existing named style should have your new roundoff value.

    The above configuration variable is needed because of an ancient problem in MicroStation's dimension style(TR#133269).  When roundoff value happens to be the same as accuracy value, the roundoff algorithm would fail and produce an incorrect result.  Your case does not fall into this scenario - you want 1mm roundoff but have 0.1 accuracy.  So you can enable the roundoff.  Eventually when aforementioned problem gets fixed, this configuration variable will be removed.

    HTH,

    Don



  • Don,

     

    It works just like you said. Thanks again. Smile

     

    Regards,

     

    Lincoln

Reply Children
No Data