Help with Parameters

Help with Parameters

matth
Advocate Advocate
942 Views
1 Reply
Message 1 of 2

Help with Parameters

matth
Advocate
Advocate

How can i drive a parameter value with a condition on another parameter? For instance in pseudocode:

 

if (width < 40) then offset = 12, else offset = 6

 

I have read somewhere using a modulus and dividing by zero to achieve some effect of a boolean operator. but i am not sure how this would work in the condition above.  I would really like to solve this, the last thing i want is to have to abstract out 2 versions of this part to handle the condition.

 

I have found something like this, should I get it working I will update the forum.

http://www.cadforum.cz/cadforum_en/inventor-trick-conditional-parameters-without-ilogic-tip9630

 

This will help I am sure:

http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-76272551-3275-46C4-AE4D-10D58B408C20

 

When trying I found I could not get ceil or round to work on my existing user parameter:

2016-12-06_11-12-59.jpg

 

Thanks again,

Matt

MSH | Matt
0 Likes
Accepted solutions (1)
943 Views
1 Reply
Reply (1)
Message 2 of 2

matth
Advocate
Advocate
Accepted solution

47 in + ( ( sign(Width - 45.9 in) ) * 1 in ) * 12

 

If the difference between the width and 45.9 is negative than the value is less than 45.9 so 0*12 = 0. Else 1*12 = 12 add the value

 

Done! It works!

MSH | Matt
0 Likes