Support Portal

for ProcessRobot and WinAutomation

Start a new topic

Using external dll library in a process

It would be  better if we can access a .net dll external assembly directly from inside process studio action, instead using power shell.


1 person likes this idea

For future reference, my powershell script looks like this:

 

# "> null" prevents console output
[Reflection.Assembly]::LoadFile("C:\temp\custom.dll") > null
# The returned objects is much bigger than needed, I'll only select a few properties from each object in the list
[Namespace.CustomDll.ClasseName]::StaticMethodThatReturnsAnIEnumrable() | select -Property ReturnObjectProperty1,ReturnObjectProperty2 | ConvertTo-Json

Afterwards I use a "Create object from json"-action on the entire powershell output. This gives me a list with elements that each has the selected properties.

I'm also very interested in this feature.


@Supratman: Have you found a nice way to get returned (.net) objects into winautomation variables.

Sample power shell code that i use


[Reflection.Assembly]::LoadFile("E:\sampledll.dll")

$action = new-object Class.Methods

$action.function($Mailserver,$Userid,$UserPassword,$Mailfolder,$Fromcontain, $Clientname)

ADMIN

Thanks Supratman!


I have forwarded your request.

Yes.

A simple dll in c#.

I run it using power shell.

ADMIN

Hello Supratman,


Thank you for the information.


Could you please be more specific? Have you created a script that you run through ProcessRobot/WinAutomation? 


In which language? and how do you run it through our product?

Sometimes i am creating a custom function inside a dll, or if we want to use already made dll for specific purpose ex : https://www.newtonsoft.com/json



It is complicated if we access it using powershell.



ADMIN

Hello Supratman,


Thank you for your suggestions.


May I ask why do you think that this would be useful? Do you have a use case in mind?


Feel free to elaborate.

Login or Signup to post a comment