Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

DLL package

  • Updated: 10/21/2021
    • Automation 360 v.x
    • Build
    • RPA Workspace

DLL package

A dynamic-link library (DLL) file contains a shared library of functions that can be used by Windows programs. The DLL package uses a .dll file as reference and calls functions from the bot.

Before you start

Perform the following actions within the DLL package as part of using the set of available actions:
Note: The DLLs built using the Microsoft .NET Framework is only supported.
  1. Use the Open action to specify the location of the .dll file you want to use and session name. Use this same session name for the other actions. The .dll referenced is automatically added as a bot dependency.
  2. Use the Run function action to run a function from the .dll and save its output value as a variable.
  3. After running the required functions, close the .dll reference. It is important to close the .dll reference to free the memory of the operating system.

    Windows and appropriate versions of Microsoft .NET Framework are available on the devices running the DLLs.

    To review the bot launcher logs, navigate to C:\ProgramData\AutomationAnywhere\BotRunner\Logs\<current month>\Bot_Launcher-<today's date>.log.zip. Each zipped folder contains a file with data on the code execution, which is useful for debugging.

Note: If the .dll file uses .NET functions or classes from another .dll file, you must add the second .dll file as a manual dependency of the bot.

Bot dependencies

When you import multiple DLLs that have one main DLL and other DLLs are referenced from it, ensure you have all the DLLs in one folder. Also, the referenced DLLs must be called using a session name that is different from the name used in the main DLL. Your bot execution will fail if the same session name is used in both the main and the referenced DLLs.

Actions in the DLL package

The DLL package includes the following actions:

Action Description
Close Closes the current session. In the Session name field, enter the name of the session.
Open Opens the reference file.
  • In the File path field, specify the location of the path.
  • Select any of the following tabs to specify the location of the DLL you want to use:
    • Control Room file: Use a DLL that is available in the Control Room.
    • Desktop file: Use a DLL that is available on a device.
    • Variable: Use a file variable to specify the location of the DLL.
  • Select any of the following tabs to create a DLL session:
    • Local session: Specify a session name that can be used only in the current bot.
    • Global session: Specify a session name that can be used across multiple bots such as parent bots, child bots, and other child bots of the parent bots.

      See Sharing sessions across bots.

    • Variable: Specify a session variable that can be used to share that session with other child bots.

      When you run the bot, it passes the session variable to the child bot, which enables the child bot to use the DLL opened in the parent bot.

Note: The DLL package supports only DLLs written in C#.
Run function (Legacy) See Using the Run function action.
Note:
  • The Run function (Legacy) action is no longer available in the Run DLL package. We recommend that you use the Run Function action from the Run DLL package because this action is an improved version of the Run function (Legacy) action.

    Note that existing bots that use the Run function (Legacy) will continue to run successfully without any issues.

  • This action is called Run function (Legacy) starting from Enterprise A2019.16. The action is called Run function in Enterprise A2019.15 and previous releases.
Run function See Using the Run function action.

Supported data types in DLL functions

The following table list the variables and data types that you can use as an input or output parameter in DLL functions.
Note: The Run function and Run function (Legacy) actions do not support any user-defined data types in the Parameter to the function or Assign output to variable field.
Variable type as input or output parameters Supported data types
String
  • Char
  • Byte
  • String
  • string
  • SByte
Number
  • UInt16
  • Int16
  • UInt32
  • Int32
  • UInt64
  • Int64
  • Int
  • Single
  • Decimal
  • Float
  • Double
Boolean
  • Boolean
  • bool
Datetime
  • Datetime
List
  • UInt16[]
  • Int16[]
  • Int32[]
  • Int64[]
  • Int[]
  • Char[]
  • Single[]
  • Decimal[]
  • Float[]
  • Double[]
  • Boolean[]
  • bool[]
  • Byte[]
  • String[]
  • Datetime[]
  • List<UInt16>
  • List<Int16>
  • List<Int32>
  • List<Int64>
  • List<Int>
  • List<Char>
  • List<Single>
  • List<Decimal>
  • List<Float>
  • List<Double>
  • List<Boolean>
  • List<bool>
  • List<Byte>
  • List<String>
  • List<Datetime>
  • List<SByte>
  • List<UInt32>
  • List<UInt64>
Datatable
  • UInt16[,]
  • Int16[,]
  • Int32[,]
  • Int64[,]
  • Int[,]
  • Char[,]
  • Single[,]
  • Decimal[,]
  • Float[,]
  • Double[,]
  • Boolean[,]
  • bool[,]
  • Byte[,]
  • String[,]
  • Datetime[,]
  • Byte[,]
  • UInt32[,]
  • UInt64[,]
Dictionary
  • Dictionary<String,UInt16>
  • Dictionary<String,Int16>
  • Dictionary<String,Int32>
  • Dictionary<String,Int64>
  • Dictionary<String,Int>
  • Dictionary<String,Char>
  • Dictionary<String,Single>
  • Dictionary<String,Decimal>
  • Dictionary<String,Float>
  • Dictionary<String,Double>
  • Dictionary<String,Boolean>
  • Dictionary<String,bool>
  • Dictionary<String,Byte>
  • Dictionary<String,String>
  • Dictionary<String,Datetime>
  • Dictionary<Int,String>
  • Dictionary<Decimal,String>
  • Dictionary<Boolean,String>
  • Dictionary<String,SByte>
  • Dictionary<String,UInt32>
  • Dictionary<String,UInt64>
Send Feedback