Invoke code activity VB.Net example

Hi there,

I am studying the invoke code activity in the new version of UiPath(V2017.1.6435). But I found that there is only a small resource about this new activity both inside the Forum and Google search. Does anybody have done a research about this new activity? I have some questions about it:

  1. Can we write VB.Net class/module inside this activity?
  2. How to connect Excel with VB.Net code directly?

Could anyone provide some training materials or some example codes? Appreciate it in advance.

I am learning an online tutorial(https://www.tutorialspoint.com/vb.net/index.htm about VB.Net, but I found difficulty to connect it to this Invoke code activity.

Best regards
M

Ok…

first:

You can reffer to methods available in the .NET library, the imports are done using UiPath.

second:

I am quoting @andrzej.kniola here "Personally I just use it solely for void methods and from useability perspective " even this is related to invoke methods I think you don’t need to reinvent the wheel here.

2 Likes

Hi ,
Pls follow video on invoke code activity

1 Like

Guys,

Here is a detailed article on that :slight_smile:

I tried the same in many ways, Looks like there is no way we can write a function and call it from within VB.NET invoke Code activity. All the examples stated here is a simple code where you send some argument values and get something out of it…

Our need is to write a code that looks like this:
// Code line 1
//Code line2
//Call function xyz
//Code line3

Function xyz(ByVal x as Integer, ByVal y as Integer)
//do something
End Function

Funnily, this scenario works perfectly when we are using a UiPath with C# code. A little disappointed that this basic feature is not working in VB.NEt UiPath that is predominantly used everywhere.

1 Like