Compiling C code using `Ui Path` activites

919 views Asked by At

Is there a way to compile a C code in Visual Studio Code by UI Automation.I want to run the code and get the result by the using UiPath Studio.

1

There are 1 answers

0
Ilya Kochetov On

UiPath custom activities are using .NET classes and as far as I know there is no direct way to call C code from UiPath, there is Python, Java and PowerShell support in addition to built-in VB.NET and C# but to C. That means that you have to resort to other methods:

  1. Invoke Method

If you already have a C program your best bet is probably using Invoke Method activity to execute a method of a COM object. This way you could use any COM objects, not necessarily written in C

  • Custom Activity in C#

If you just know how to write C code and want to use it with your robot create a new custom activity using UiPath Activity Creator extension for Visual Studio, it's very straightforward and easy to use. You will need to write C# instead of C but it is rarely a big challege.

  • Custom activity in C# referencing C libraries

If you go that way you could reference existing C code (see this answer as an example of referencing C libraries in C#).

  • Compile C code into .NET

Alternatively you could write a custom activity using something like OrangeC to compile your C code into .NET class but I think it's a little bit of too much hassle.