Inventor General Discussion

Inventor General Discussion

Reply
Contributor
brian
Posts: 15
Registered: ‎01-19-2007
Message 1 of 3 (240 Views)
Accepted Solution

Using iLogic to change model tolerance

240 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" 

 

IV2012

 

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

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.

*Expert Elite*
cwhetten
Posts: 1,090
Registered: ‎09-03-2008
Message 2 of 3 (218 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.

Mentor
jddickson
Posts: 182
Registered: ‎10-07-2011
Message 3 of 3 (216 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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.