Import external library
- Last UpdatedJul 10, 2026
- 4 minute read
You import external libraries of .NET and Python so that you can use them in your scripts.
External libraries or modules
External libraries or modules pane displays a list of imported custom libraries used in your scripts, allowing you to manage (add or remove) these references as needed. It include two tabs.
-
References tab displays the list of the imported custom libraries. The .NET libraries are listed under .NET and Python libraries are listed under Python. Note that the default libraries are automatically added by the system. These libraries are disabled by default and cannot be selected or removed.
-
Default .NET libraries are:
-
AVEVA.CredentialManagement.dll
-
AVEVA.Scripting.dll
-
-
Default Python libraries are:
-
CredentialManagement.py
-
Logger.py

-
-
-
Includes tab provides the option to add the namespace to the .NET library. Use the plus icon to add a namespace. For example, add a namespace pump.lib for the custom library you have imported. After adding the namesapce, you can use this class directly without the full namespace path in your script.

By default, some of the standard .NET namespace are added that will be disabled and you cannot remove them. The AVEVA.Scripting namespace lets you write to the common logger and the AVEVA.CredentialManagement namespace lets you call credentials saved in Credential Manager.
Example:
public void ScriptCredentials()
{
Credentials CredDetails = CredentialManager.GetCredentials("DatabaseCredential");
me.CredName = CredDetails.CredentialName;
me.Authentication = CredDetails.Domain;
me.UserID = CredDetails.UserName;
me.Passcode = CredDetails.Password;
if(me.Authentication != "")
{
Logger.LogInfo("Credential Name is \""+ me.CredName + "\" with Windows Authentication and the UserName is "+ me.UserID) ;
}
else
{
Logger.LogWarning("Credential Name is \""+ me.CredName + "\" with SQL Authentication and the UserName is "+ me.UserID) ;
}
}

Here:
ScriptCredentials is the UDT script Name
CredName,DomainName, UserID and Passcode are of message type members of a UDT template.
"DatabaseCredential" is the Named credential name.
The above example retrieves a saved credential named "DatabaseCredential" from Credential Manager and extracts the credential details for use within the application. It then determines whether the credential uses Windows Authentication or SQL Authentication based on the presence of a domain name and logs the credential name and user name accordingly. For Windows Authentication, the script writes an informational message to the logger. For SQL Authentication, it writes a warning message.
Import using External reference libraries pane
-
Select the Import
on the right-corner of the script window.
The External reference libraries pane appears.
-
Select the plus icon to add an external library.

-
In the Import external libraries window that appears, browse and select the required library file and select Open.

The successfully imported message appears.
-
Select Ok.
The imported library is listed under the References tab.
Import from the File menu
-
In the Window Maker, go to File and then select Import.
-
Select External Library.
-
Select .NET if you want to import .NET library or select Python if you want to import Python library.
-
In the window that appears, select the library file and select Open.
-
Select Import.
The imported file will be available in the External folder under Application folder.
Note: After importing the libraries, if you add scripts based on those libraries and export them to a JSON file, importing that JSON into a new application will not work unless the libraries are manually imported again.
For C# script the following namespaces are automatically implemented by default:
string[] includes =
{
"System",
"System.Text",
"System.IO",
"System.Linq",
"System.Collections",
"System.Collections.Generic",
"System.Threading.Tasks",
"System.Net.Http",
"System.Text.Json",
};
Delete a library
You can delete the libraries that you have imported. However, you cannot delete the default libraries InTouchScriptingLogger.dll and logger.py.
-
Select the required library. If you want to select all libraries select
icon.
-
Select delete icon.
A message confirming to delete the library appears.
-
Select Yes.
The selected library gets deleted. The script service will get restarted after the deletion of the library.