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 | Archive Tool |
|---|---|
| Tools Explorer | /Data tools/Archive Tool |
| NuGet Package | DHI.MikeOperations.SystemManager.Tools.Archive |
| API Reference | DHI.Solutions.SystemManager.Tools.ArchiveTool.IArchiveTool |
| Input Items | No input items required |
| Output Items | No output items |
Tool Properties
| Display Name | Name | Description |
|---|---|---|
| Archive Path | DataExportPath | Gets or sets the path where data will be exported or imported. |
| 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. |
| Archive Mode | ArchiveMode | Gets or sets the mode that the tool should run with. |
| Continue on error | ContinueOnError | Gets or sets a value indicating whether import errors will allow import to continue. |
Code Sample
// Get the tool.
var tool = application.Tools.CreateNew("Archive Tool") as DHI.Solutions.SystemManager.Tools.ArchiveTool.IArchiveTool;
# Get the tool.
tool = app.Tools.CreateNew("Archive Tool")
# Get the tool.
tool = DHI.Solutions.SystemManager.Tools.ArchiveTool.IArchiveTool(app.Tools.CreateNew("Archive Tool"))
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 | Data Export Tool |
|---|---|
| Tools Explorer | /Data tools/Data Export Tool |
| NuGet Package | DHI.MikeOperations.SystemManager.Tools.DataExportImport |
| API Reference | DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataExportTool |
| Input Items | No input items required |
| Output Items | No output items |
Tool Properties
| Display Name | Name | Description |
|---|---|---|
| Export changes since | ExportChangeSince | Gets or sets a value indicating whether export change part of entity since a specified time |
| Export since date time | ExportSinceDateTime | Gets or sets the date time which entity part has been update since this time can be exported |
| Display Name | Name | Description |
| --- | --- | --- |
| Export Path | Path | Gets or sets the path where data will be exported or imported. |
| ExportSession | Gets the export session | |
| Continue on error | ContinueOnError | Gets or sets a value indicating whether import errors will allow import to continue. |
Tool Methods
- AddEntity(DHI.Solutions.Generic.IEntity entity): Add an entity to the list of entities to be exported.
Code Sample
// Get the tool.
var tool = application.Tools.CreateNew("Data Export Tool") as DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataExportTool;
# Get the tool.
tool = app.Tools.CreateNew("Data Export Tool")
# Get the tool.
tool = DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataExportTool(app.Tools.CreateNew("Data Export Tool"))
Data Import Tool¶
Tool for importing MIKE OPERATIONS entities exported by the Data Export tool into the managers of MIKE OPERATIONS.
| Tool Info | Data Import Tool |
|---|---|
| Tools Explorer | /Data tools/Data Import Tool |
| NuGet Package | DHI.MikeOperations.SystemManager.Tools.DataExportImport |
| API Reference | DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataImportTool |
| Input Items | No input items required |
| Output Items | No output items |
Tool Properties
| Display Name | Name | Description |
|---|---|---|
| Overwrite | Overwrite | Gets or sets a value indicating whether overwrite the exist entity or just extend it |
| Display Name | Name | Description |
| --- | --- | --- |
| Import Path | Path | Gets or sets the path where data will be exported or imported. |
| ExportSession | Gets the export session | |
| Continue on error | ContinueOnError | Gets or sets a value indicating whether import errors will allow import to continue. |
Code Sample
// Get the tool.
var tool = application.Tools.CreateNew("Data Import Tool") as DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataImportTool;
# Get the tool.
tool = app.Tools.CreateNew("Data Import Tool")
# Get the tool.
tool = DHI.Solutions.SystemManager.Tools.DataExportImportTool.IDataImportTool(app.Tools.CreateNew("Data Import Tool"))