Parameter equation with true/false input

Parameter equation with true/false input

lanceTH8MH
Explorer Explorer
703 Views
2 Replies
Message 1 of 3

Parameter equation with true/false input

lanceTH8MH
Explorer
Explorer

I just want to verify that there is no way to have a parameter equation to use a true/false parameter as a input/factor. As True=1 and False=0, I would think you should be able to use them in a unitless manner. 

 

If my assumption is true, might I suggest that this be added in.

 

parameter1 = True/False

parameter2 = 100 + (parameter1 * 5)

 

if True output would be 105

if False output would be 100

0 Likes
704 Views
2 Replies
Replies (2)
Message 2 of 3

Gabriel_Watson
Mentor
Mentor
True and False are saved as Boolean values, so you would need a cast operator to convert them into unitless. You could also easily convert via some iLogic the param1 value to param1unitless with if/else and then use that in param2. See some ideas here:
https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/if-then-else-statement-in-parameters...
Message 3 of 3

blandb
Mentor
Mentor

couple ideas:

 

'If test_param = 1
'	output = 100 + (test_param * 5 ul)
'	Else
'		output = 100
'	end if

If true_false = True Then
	output = 100 + (1 * 5)
	Else
		output = 100
		
	end if
Autodesk Certified Professional