Tools¶
Properties of a tool (if any) can be specified in the Properties window in MIKE Workbench.
Generic FTP Download¶
Tool for downloading files from a FTP site.
Tool Info | |
---|---|
Display Name | Generic FTP Download |
API Name | Generic ftp download |
Tools Explorer | /Web tools/Generic FTP Download |
NuGet Package | DHI.MikeOperations.Core.Tools.FTPDownload |
Assembly name (.dll) | DHI.Solutions.Generic.UI.Tools.GenericFTPDownload.dll |
API Reference | DHI.Solutions.Generic.UI.Tools.GenericFTPDownload.IGenericFTPDownloadTool |
Input Items | No input items required |
Output Items | No output items |
Tool Properties
Display Name | API Name | Description |
---|---|---|
Parameters | ||
Delete remote file | DeleteRemoteFile | Gets or sets a value indicating whether files should be deleted from the FTP site after they have been downloaded. Note that the property is only available when: ProtocolType=Sftp,Ftp |
Download file newer than | DownloadFileNewerThan | Gets or sets the date from where files should be downloaded. Files newer than this date will be downloaded. Note that the property is only available when: ProtocolType=Sftp,Ftp |
Download file older than | DownloadFileOlderThan | Gets or sets the date of files to download to. Files older then this date will be downloaded. Note that the property is only available when: ProtocolType=Sftp,Ftp |
Local download folder | LocalDownloadFolder | Gets or sets the local folder to download to. |
Name pattern | NamePattern | Gets or set the pattern of file names to download. Note that the property is only available when: ProtocolType=Sftp,Ftp |
Overwrite | Overwrite | Gets or sets a value indicating whether existing local files should be overwritten during download. |
Protocol Type | ProtocolType | Gets or set the protocol to use for downloading. |
Server Information | ||
Host | Host | Gets or sets the host to use for downloading for ProtocolType SFTP. Note that the property is only available when: ProtocolType=Sftp |
Password | Password | Gets or sets the password of the user used for downloading files from FTP. Note that the property is only available when: ProtocolType=Ftp,Sftp |
Private Key File | PrivateKeyFile | Gets or sets the private key file to use for protokol SFTP. Note that the property is only available when: ProtocolType=Sftp |
Private Key Passphrase | PrivateKeyPassphrase | Gets or sets the key password phrase to use for protokol SFTP. Note that the property is only available when: ProtocolType=Sftp |
Server Address/FTP Folder | ServerAddress | Gets or sets the server address. |
SSH Host Key Fingerprint | SshHostKeyFingerprint | Gets or sets the host key fingerprint for protokol SFTP. Note that the property is only available when: ProtocolType=Sftp |
User name | UserName | Gets or sets the username to use for downloading from FTP. Note that the property is only available when: ProtocolType=Sftp,Ftp |
Code Sample
import clr
clr.AddReference("DHI.Solutions.Generic.UI.Tools.GenericFTPDownload")
from DHI.Solutions.Generic.UI.Tools.GenericFTPDownload import *
# Get the tool.
tool = app.Tools.CreateNew("Generic ftp download")
# Add input items.
tool.InputItems.Add(<No input items required>)
# Set tool properties before executing the tool.
tool.Execute()
# Read the output from the list of output items.
output = tool.OutputItems
import clr
clr.AddReference("DHI.Solutions.Generic.UI.Tools.GenericFTPDownload")
from DHI.Solutions.Generic.UI.Tools.GenericFTPDownload import *
# Get the tool.
tool = DHI.Solutions.Generic.UI.Tools.GenericFTPDownload.IGenericFTPDownloadTool(app.Tools.CreateNew("Generic ftp download"))
# Add input items.
tool.InputItems.Add(<No input items required>)
# Set tool properties before executing the tool.
tool.Execute()
# Read the output from the list of output items.
output = tool.OutputItems
// Get the tool.
var tool = application.Tools.CreateNew("Generic ftp download") as DHI.Solutions.Generic.UI.Tools.GenericFTPDownload.IGenericFTPDownloadTool;
// Add input items.
tool.InputItems.Add(<No input items required>);
// Set tool properties before executing the tool.
tool.Execute();
// Read the output from the list of output items.
output = tool.OutputItems;
Runtime.config
What tools to load during application startup, is specified in the XML file Runtime.config
in the plugins section of the manager.
The XML below shows the tool plugin information found in the Runtime.config
file.
<Plugin
Name="DHI.Solutions.Generic.UI.Tools.GenericFTPDownload.GenericFTPDownloadTool"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.Generic.UI.Tools.GenericFTPDownload.dll" />
To list¶
The ToList tool. Displays the output of tools to a ListView
Tool Info | |
---|---|
Display Name | To list |
API Name | To list |
Tools Explorer | /Output Tools/To list |
NuGet Package | DHI.MikeOperations.Core.Tools.ToList |
Assembly name (.dll) | DHI.Solutions.Generic.UI.Tools.ToList.dll |
API Reference | DHI.Solutions.Generic.UI.Tools.ToList.ToList |
Input Items | One or more data tables or one or more list of objects |
Output Items | A list data view |
Tool Properties
The tool has no properties.
Code Sample
import clr
clr.AddReference("DHI.Solutions.Generic.UI.Tools.ToList")
from DHI.Solutions.Generic.UI.Tools.ToList import *
# Get the tool.
tool = app.Tools.CreateNew("To list")
# Add input items.
tool.InputItems.Add(<One or more data tables or one or more list of objects>)
tool.Execute()
# Read the output from the list of output items.
output = tool.OutputItems
// Get the tool.
var tool = application.Tools.CreateNew("To list") as DHI.Solutions.Generic.UI.Tools.ToList.ToList;
// Add input items.
tool.InputItems.Add(<One or more data tables or one or more list of objects>);
tool.Execute();
// Read the output from the list of output items.
output = tool.OutputItems;
Runtime.config
What tools to load during application startup, is specified in the XML file Runtime.config
in the plugins section of the manager.
The XML below shows the tool plugin information found in the Runtime.config
file.
<Plugin
Name="DHI.Solutions.Generic.UI.Tools.ToList.ToList"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.Generic.UI.Tools.ToList.dll" />