Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Upper and Lower Limits of a Model Parameter - For Tolerance Stackup

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
RoyWickrama_RWEI
729 Views, 3 Replies

Upper and Lower Limits of a Model Parameter - For Tolerance Stackup

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.

3 REPLIES 3
Message 2 of 4

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



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
Message 3 of 4

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.

Message 4 of 4

Nice work, your code is clean and clear.


--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report