Custom Function in Ilogic

Custom Function in Ilogic

Anonymous
Not applicable
666 Views
3 Replies
Message 1 of 4

Custom Function in Ilogic

Anonymous
Not applicable

Hello Everyone,

I am trying to replace a repeated set of codes with a function. The function should have one Input parameter and one output parameter.

I tried finding out in Inventor forums but I couldn't a suitable one.

For Example, please give me a solution for a Function which cubes the input value. 

Function name: Cubic_Function

Input: 3

Expected return value: 27

0 Likes
Accepted solutions (1)
667 Views
3 Replies
Replies (3)
Message 2 of 4

J-Camper
Advisor
Advisor
Accepted solution

This is an iLogic sample, are you working in iLogic or VBA Macro?

Sub Main
	
	MessageBox.Show(Cubic_Function(3).ToString, "Title")
	
End Sub

Public Function Cubic_Function(Input As Double) As Double
	
	Result = Input ^ 3
	Return Result
	
End Function
0 Likes
Message 3 of 4

Anonymous
Not applicable

@J-Camper Thank you. I'm using iLoigc

0 Likes
Message 4 of 4

Anonymous
Not applicable

@J-Camper Thank you. I'm using iLogic

0 Likes