API Bug in Tolerance.SetToFits

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I might have found a bug when setting the tolerance of a parameter to a hole tolerance via api (VBA) in Inventor 2020.3 using mm units.
Steps to reproduce:
1. In a part set the tolerance of any parameter (e.g. diameter of a holefeature or a dimension in a sketch) to a hole tolerance ("H7") by hand without using the api. This would set the upper value of the tolerance for e.g. 10 mm H7 to +0,015 mm.
2. Do the same with vba and the upper value of the tolerance is set to +0,15 mm which is wrong.
Examplecode (set to hole tolerance manually before running the code):
Sub TestSetToFits()
Dim doc As Document, paras As Inventor.Parameters, para As Inventor.Parameter
Set doc = ThisApplication.ActiveDocument
Set paras = doc.ComponentDefinition.Parameters
Set para = paras("d0") 'change index or key (e.g. "d39") to the right one
Debug.Print para.Tolerance.Upper
para.Tolerance.SetToFits kLimitsFitsShowTolerance, "H7", ""
Debug.Print para.Tolerance.Upper
End Sub
As far as I could test this only happens with hole tolerances and not with shaft. Was this already solved? If yes is there a hotfix for Inventor 2020?
Inventor 2020.3
Windows 10 64 Bit