Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
dalton98
in reply to: 37xitp4

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