I need to change one dimension using iLogic. It changes due to the path taken to manufacture the part. In a nutshell majority of the time the "OD" has a +.004 / .000 tolerance and the model is drawn at the minimum size. There are cases when the "OD" has a +.005/-.005 tolerance and is modeled at the nominal size. I've learned some of the iLogic to make the change I'm after but not all. I'm having trouble setting ModelValueType to change the model size.
See the code below, for setting +/-.005"
Thanks for your help
National K Works Inc.
Parameter.Param("OD").Tolerance.SetToDeviation(".005 in" , "-.005 in") 'will set tolerace
Parameter.Param("OD").Comment = "Tolerance Set by a Rule +/-.005"""
Parameter.Param("OD").ModelValueType = kNominalValue 'received: parameter is incorrect
Solved! Go to Solution.
Hi and welcome to the forum!
You've almost got it. Just add one thing to your line as follows:
Parameter.Param("OD").ModelValueType = ModelValueTypeEnum.kNominalValue
Please click "Accept as Solution" if this response answers your question.
I don’t know if it’s the best way but I think you can use an if statement saying if the OD is greater then ??? then use whatever tolerance you want.
I hope this helps.