Inventor Customization

Reply
Mentor
mehatfie
Posts: 163
Registered: ‎02-10-2012
Message 11 of 14 (135 Views)

Re: ilogic rule to make all my number in odd number

12-06-2012 07:15 AM in reply to: sergelachance

Hi sergelachance,

 

I'm not quite sure I understnad what the problem is. The code I provided adds 1 to an even number in order to make it odd. You could also MINUS 1 if you'd like in order to achieve an odd number as well.

 

What confuses me with your code is that you have 2 different parameters being used.

 

Why is it:

 

("TROUSTAB" Mod 2) = 0 Then

     "QTETROUSTAB" = "TROUSTAB" + 1

 

 

 

Shouldn't it  be:

 

("TROUSTAB" Mod 2) = 0 Then

     "TROUSTAB" = "TROUSTAB" + 1

 

 

Regards

Mitch

 

Let me know if it helps... Kudos if it works!!!

Distinguished Contributor
sergelachance
Posts: 166
Registered: ‎04-30-2012
Message 12 of 14 (124 Views)

Re: ilogic rule to make all my number in odd number

12-07-2012 03:30 AM in reply to: mehatfie

Hi Mitch, i try your new rule but dont work again :smileysad:

 

even number 2.PNG

Mentor
mehatfie
Posts: 163
Registered: ‎02-10-2012
Message 13 of 14 (119 Views)

Re: ilogic rule to make all my number in odd number

12-07-2012 06:17 AM in reply to: sergelachance

Sergelachance,

 

That was NOT a new rule,  you must keep the OLD rule but replace the parameter name

 

 

If (Parameter("TROUSTAB") Mod 2) = 0 Then
     Parameter("TROUSTAB") = Parameter("TROUSTAB") + 1
End If

 

Distinguished Contributor
sergelachance
Posts: 166
Registered: ‎04-30-2012
Message 14 of 14 (114 Views)

Re: ilogic rule to make all my number in odd number

12-07-2012 06:48 AM in reply to: mehatfie

OK, Thank you very much Mitch for your time :smileyhappy:

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
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 to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube