Inventor General Discussion

Inventor General Discussion

Posts: 15
Registered: ‎01-19-2007
Message 1 of 3 (200 Views)
Accepted Solution

Using iLogic to change model tolerance

200 Views, 2 Replies
07-08-2013 09:42 AM

Hello Group-


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

Brian Brisbin

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
*Expert Elite*
Posts: 1,064
Registered: ‎09-03-2008
Message 2 of 3 (178 Views)

Re: Using iLogic to change model tolerance

07-08-2013 01:43 PM in reply to: brian

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

Cameron Whetten
Inventor 2012

Please click "Accept as Solution" if this response answers your question.

Posts: 180
Registered: ‎10-07-2011
Message 3 of 3 (176 Views)

Re: Using iLogic to change model tolerance

07-08-2013 01:51 PM in reply to: brian

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.

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.