Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Custom Functions in iLogic

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
fsdolphin
2535 Views, 2 Replies

Using Custom Functions in iLogic

Hi,

 

First of all I'm new to iLogic and VB/VB.NET but I have some programming experience with C++, Objective-C, Javascript etc. I'm writing a rule and I was wondering if there is a way to add and call custom functions within iLogic?

 

Is there a way to add and call custom functions within iLogic?

 

I tried...

 

    Function someFunction
    ' do something
    End Function

also...

 

Sub Main()

    Function someFunction
    ' do something
    End Function

End Sub

 

But I keep getting the following error "Statement cannot appear within a method body. End of method assumed."

 

 

Can someone be so kind and explain how can I use custom functions within iLogic?

 

Thanks a lot.

 

2 REPLIES 2
Message 2 of 3
fsdolphin
in reply to: fsdolphin

Got it, I guess Visual Basic works in a similar way as C++ 

 

 

 

Sub Main()
    showMessage()
End Sub


Function showMessage
    MessageBox.Show("Some Message", "Title")
End Function
Message 3 of 3
kahn.cad
in reply to: fsdolphin

Thanks. Your solution also help me. I search for the main function in iLogic.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report