11-01-2022
12:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
11-01-2022
12:04 PM
It looks like those values are in centimeters. If you wanted the the value to be exact you would set the tolerance to (1 * 2.54 = 2.54). Its a bit odd because you wouldn't use any values between 0-1 (* 2.54). Youll have to convert it to vba.
Dim oDrawingDoc As DrawingDocument = ThisApplication.ActiveDocument Dim oSheet As Sheet = oDrawingDoc.ActiveSheet Dim oDim As DrawingDimension = oSheet.DrawingDimensions.Item(1) 'MessageBox.Show(oDim.ModelValue) oDim.Tolerance.SetToLimits(ToleranceTypeEnum.kLimitLinearTolerance, 2 * 2.54, -0.4 * 2.54) MessageBox.Show(oDim.Tolerance.Lower / 2.54) 'MessageBox.Show(Round(oDim.Tolerance.Upper, 3)) If oDim.Tolerance.Lower > 0 And oDim.Tolerance.Lower < 2.54 oDim.Tolerance.SetToLimits(ToleranceTypeEnum.kLimitLinearTolerance, oDim.Tolerance.Upper, 1 * 2.54) End If