Invoke Code - Compile Functions

The “invoke code” element seems to be an invisible “Private Sub …” Statement in which you can throw your code, is that right?

Is it possible to use and run more complex VB.net code in UIPath?

Private Iterator Function Tokens(ByVal phrase As String) As IEnumerable(Of String)
	...
End Function

Private Function subCompile(ByVal te As IEnumerator(Of String), ByVal g As ParameterExpression) As Expression
	Return ...
End Function

Public Function Compile(ByVal phrase As String) As Func(Of HashSet(Of String), Boolean)
	Return ...
End Function

Thank you!

Hy @purplemouse651,

If you want you can create an excel file, create vba code there and then use the execute macro activity inside excel scope. Yes you can do it!
I use it to run Sap gui scripting, for example, works great

Hi William,
thank you for your answer. So far I do not want to create an Excel file. Also my Functions heavily use .net Framework functionalty. Lots of the stuff has no real corresponding in VBA.

Is there a possibility to define classes and functions in UIPath? The “invoke code” functionality seems not taking that kind of code-pattterns.

BR

1 Like

Hi @purplemouse651, welcome to the forum!

It’s something like that!

However, if you want to execute a VB.NET script you can check this other activity and see if this works for you: Invoke VBScript

If you want more complex things, you could always create your own custom activities.

1 Like

Hy @purplemouse651,

Just to complement, you can create custom activities in C# using the Custom activity creator.

Have a look:
DEMO: Build custom activities in minutes with the UiPath Activity Creator - YouTube