Could some one help me to create variables for the upper and lower limits of a model parameter. For example if Dia = 12.5 +/-0.05, I need to create variables such as Dia_max and Dia_min which are equal to 15.55 and 12.45 respectively.
I did not find any match in my searches for this.
Description: I am planning to use "Tolerance loop" sketches in the model sketch so that I will be able to calculate the min or max (say minimum wall thickness or max wall thickness of the flange of a part). This loop is associated with model parameters only so that they are aasigned with the applicable tolerances. For the tolerance stack-up calculation, now, I need to retrieve the maximum and mimimum values of these parameters.
Thanks.
Solved! Go to Solution.
Solved by rossano_praderi. Go to Solution.
Hi,
these are two examples for parametres tolerance.
The first piece of code read the parameter tolerance (you have to set it up through the inventor interface).
The second part is a demonstration of how you can check if the parameter is respecting the tolerance (you don't need to set the parameter tolerance).
' First part - Read the parameter tolerance MsgBox("Upper Tolerance " & Round(Parameter.Param("d3").Tolerance.Upper,3) & vbCr & _ "Upper Tolerance " & Round(Parameter.Param("d3").Tolerance.Lower,3)) ' Second part - Set two Constants as tolerance 'Const UpperLimit = 12.55 'Const LowerLimit = 12.45 ' 'If d3 > UpperLimit Or d3 < LowerLimit Then ' MsgBox("The parameter " & "d3" & " Is out of limits!") 'End If
Bregs
Rossano Praderi
Thanks for the reply. I really could do what I need with your posting.
Attached here to is (as a sample) the work I did.
Thanks a lot.