Tools¶
Properties of a tool (if any) can be specified in the Properties window in MIKE Workbench.
Archive Tool¶
Tool for archiving entity information (import, export, clean and change log updates and metadata). The tool archives based on an archive configuration in a spreadsheet placed in the spreadsheet manager of MIKE OPERATIONS. The archive configuration spreadsheet must contain the following columns.
- Path: Full path to the entity in the manager of the entity.
- Entity Type: Type of data to be archived (timeseries, timeseriesgroup, featureclass, featureclassgroup, raster, rastergroup, spreadsheet, spreadsheetgroup, scenario).
- Archive: Is archive mode is enabled (TRUE/FALSE).
- Cleanup: Is cleanup mode enabled (TRUE/FALSE).
- Age: The age of the entity
- Age Unit: The age unit (Hours, Days, Weeks, Months).
- Partial: Is partial mode enabled (TRUE/FALSE).
- Archive Changelog: Is archive change log enabled (TRUE/FALSE).
- Delete changelog: Delete the change log (TRUE/FALSE).
- Archive metadata: Archive metadata (TRUE/FALSE)
- FromDate: Date from which to run archive.
- ToDate: Date to which to run archive.
- Active: Is the archive configuration active (TRUE/FALSE).
Tool Info | |
---|---|
Display Name | Archive Tool |
API Name | Archive Tool |
Tools Explorer | /Data tools/Archive Tool |
NuGet Package | DHI.MikeOperations.SystemManager.Tools.Archive |
Assembly name (.dll) | DHI.Solutions.SystemManager.Tools.ArchiveTool.dll |
API Reference | DHI.Solutions.SystemManager.Tools.ArchiveTool.IArchiveTool |
Input Items | No input items required |
Output Items | No output items |
Tool Properties
Display Name | API Name | Description |
---|---|---|
Parameters | ||
Archive Mode | ArchiveMode | Gets or sets the mode that the tool should run with. |
Archive Path | DataExportPath | Gets or sets the path where data will be exported or imported. |
Continue on error | ContinueOnError | Gets or sets a value indicating whether import errors will allow import to continue. |
Spreadsheet Path (starting with /) | SpreadsheetConfigurationPath | Gets or sets the path where the spreadsheet configuration is stored. |
Worksheet Name | WorksheetName | Gets or sets the worksheet name where the archive configuration is stored. |
Code Sample
import clr
clr.AddReference("DHI.Solutions.SystemManager.Tools.ArchiveTool")
from DHI.Solutions.SystemManager.Tools.ArchiveTool import *
# Get the tool.
tool = app.Tools.CreateNew("Archive Tool")
# 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.SystemManager.Tools.ArchiveTool")
from DHI.Solutions.SystemManager.Tools.ArchiveTool import *
# Get the tool.
tool = DHI.Solutions.SystemManager.Tools.ArchiveTool.IArchiveTool(app.Tools.CreateNew("Archive Tool"))
# 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("Archive Tool") as DHI.Solutions.SystemManager.Tools.ArchiveTool.IArchiveTool;
// 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.SystemManager.Tools.ArchiveTool.ArchiveTool"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.SystemManager.Tools.ArchiveTool.dll" />
Data Export Tool¶
Tool for exporting entities from MIKE OPERATIONS managers. The export can be imported into another MIKE OPERATIONS database using the Data Import tool.
Tool Info | |
---|---|
Display Name | Data Export Tool |
API Name | Data Export Tool |
Tools Explorer | /Data tools/Data Export Tool |
NuGet Package | DHI.MikeOperations.SystemManager.Tools.DataExportImport |
Assembly name (.dll) | DHI.Solutions.SystemManager.Tools.DataExportImportTool.dll |
API Reference | DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataExportTool |
Input Items | No input items required |
Output Items | No output items |
Tool Properties
Display Name | API Name | Description |
---|---|---|
Parameters | ||
Continue on error | ContinueOnError | Gets or sets a value indicating whether import errors will allow import to continue. |
Export changes since | ExportChangeSince | Gets or sets a value indicating whether export change part of entity since a specified time |
Export Path | Path | Gets or sets the path where data will be exported or imported. |
Export since date time | ExportSinceDateTime | Gets or sets the date time which entity part has been update since this time can be exported. Note that the property is only available when: ExportChangeSince=True |
Tool Methods
- AddEntity(DHI.Solutions.Generic.IEntity entity): Add an entity to the list of entities to be exported.
Code Sample
import clr
clr.AddReference("DHI.Solutions.SystemManager.Tools.DataExportImportTool")
from DHI.Solutions.SystemManager.Tools.DataExportImportTool import *
# Get the tool.
tool = app.Tools.CreateNew("Data Export Tool")
# 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.SystemManager.Tools.DataExportImportTool")
from DHI.Solutions.SystemManager.Tools.DataExportImportTool import *
# Get the tool.
tool = DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataExportTool(app.Tools.CreateNew("Data Export Tool"))
# 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("Data Export Tool") as DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataExportTool;
// 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.SystemManager.Tools.DataExportImportTool.DataExportTool"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.SystemManager.Tools.DataExportImportTool.dll" />
Data Import Tool¶
Tool for importing MIKE OPERATIONS entities exported by the Data Export tool into the managers of MIKE OPERATIONS.
Tool Info | |
---|---|
Display Name | Data Import Tool |
API Name | Data Import Tool |
Tools Explorer | /Data tools/Data Import Tool |
NuGet Package | DHI.MikeOperations.SystemManager.Tools.DataExportImport |
Assembly name (.dll) | DHI.Solutions.SystemManager.Tools.DataExportImportTool.dll |
API Reference | DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataImportTool |
Input Items | No input items required |
Output Items | No output items |
Tool Properties
Display Name | API Name | Description |
---|---|---|
Parameters | ||
Continue on error | ContinueOnError | Gets or sets a value indicating whether import errors will allow import to continue. |
Import Path | Path | Gets or sets the path where data will be exported or imported. |
Overwrite | Overwrite | Gets or sets a value indicating whether overwrite the exist entity or just extend it |
Code Sample
import clr
clr.AddReference("DHI.Solutions.SystemManager.Tools.DataExportImportTool")
from DHI.Solutions.SystemManager.Tools.DataExportImportTool import *
# Get the tool.
tool = app.Tools.CreateNew("Data Import Tool")
# 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.SystemManager.Tools.DataExportImportTool")
from DHI.Solutions.SystemManager.Tools.DataExportImportTool import *
# Get the tool.
tool = DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataImportTool(app.Tools.CreateNew("Data Import Tool"))
# 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("Data Import Tool") as DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataImportTool;
// 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.SystemManager.Tools.DataExportImportTool.DataImportTool"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.SystemManager.Tools.DataExportImportTool.dll" />