any body know some example VB.NET code to create custom activities?
The UiPath example is C#
Thanks
Hello,
Here you are.
Imports System.Activities
Imports System.ComponentModel
Namespace SampleActivity
Public Class TestDoubleActivity
Inherits CodeActivity<Category("Input")> Public Property InputNumber As InArgument(Of Int32) <Category("Output")> Public Property OutputNumber As OutArgument(Of Int32) Protected Overrides Sub Execute(context As CodeActivityContext) Dim inputNumber As Int32 Dim outputNumber As Int32 inputNumber = Me.InputNumber.Get(context) outputNumber = inputNumber * 2 Me.OutputNumber.Set(context, outputNumber) End Sub End Class
End Namespace
Regards,
Thanks
Thanks,
Do you have some aditional information or documents related to custom activities deploy?
Hi,
You can get some information about custom activity for Windows Workflow Foundation, in the internet. This will probably be a good reference for that because UiPath is based on it.
ex. How to: Create an Activity - .NET Framework | Microsoft Learn
Regards,
Thanks,
it was very good
@Yoichi: Can you please let me know which language is this. Because I need to write custom activity as well.
Thanks1
Anmol
Hi
I usually write custom activity in C#. But if you are familiar with visual basic, it’s no problem I think.
I usually write my custom activities in C# or VB, but using the flowchart parent clases, you can write in any .NET language
Any idea on how to do this with powershell?
Is it possible to do something like this using powershell?
Hello everyone! Digging up this old post in order to leave here an article about best practices when creating custom activities that was just posted on the community blog: Building a Custom Activity in UiPath Studio Best Practices | UiPath
And @Caleb_Trantow - no, that would not be possible unfortunately.
Hi @derojas
I want to create Custom Activities with VB.NET too.
Can you give a sample that already used in the uipath.
The code that Yoichi post,I can create solution and used nuget explorer to create custom activity,But it can’t install success without any errors.
And I create the solution in the visual studio 2015 like the blew " Create the ReadInt activity"
Hi,
Can you share your nupkg file?
Regards,
Hi Yoichi
MyPackage.1.0.0.nupkg (5.8 KB)
blow is the activity source.
ActivityLibrary1.zip (46.0 KB)
@donghai
Hi,
In my environment (2018.4.6 and 2019.10.2CE), your package works well as the following image…
Can you share your error message?
Regards
Hi Yoichi
My envrioment is 2019.10.2CE.
It will not occur any errors during installing the package.
But When it finished, the screenshot like below
Hi @donghai
Is there any message if you hover your mouse pointer on exclamation mark icon?
or
Is there any message for this package in Studio.log? It usually is at C:\Users\[User name]\AppData\Local\UiPath\Logs
Regards,