Tools¶
Properties of a tool (if any) can be specified in the Properties window in MIKE Workbench.
Export spreadsheet¶
Tool for exporting spreadsheets into external files.
Tool Info | |
---|---|
Display Name | Export spreadsheet |
API Name | Export Spreadsheet |
Tools Explorer | /Export/Export spreadsheet |
NuGet Package | DHI.MikeOperations.SpreadsheetManager.Tools.ExportSpreadsheet |
Assembly name (.dll) | DHI.Solutions.SpreadsheetManager.UI.Tools.ExportSpreadsheet.dll |
API Reference | DHI.Solutions.SpreadsheetManager.UI.Tools.ExportSpreadsheet.IExportSpreadsheet |
Input Items | A single spreadsheet |
Output Items | No output items |
Tool Properties
Display Name | API Name | Description |
---|---|---|
Parameters | ||
File Path | FilePath | Gets or sets the file path fo the spreadsheet to exmport |
Code Sample
import clr
clr.AddReference("DHI.Solutions.SpreadsheetManager.UI.Tools.ExportSpreadsheet")
from DHI.Solutions.SpreadsheetManager.UI.Tools.ExportSpreadsheet import *
# Get the tool.
tool = app.Tools.CreateNew("Export Spreadsheet")
# Add input items.
tool.InputItems.Add(<A single spreadsheet>)
# 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.SpreadsheetManager.UI.Tools.ExportSpreadsheet")
from DHI.Solutions.SpreadsheetManager.UI.Tools.ExportSpreadsheet import *
# Get the tool.
tool = DHI.Solutions.SpreadsheetManager.UI.Tools.ExportSpreadsheet.IExportSpreadsheet(app.Tools.CreateNew("Export Spreadsheet"))
# Add input items.
tool.InputItems.Add(<A single spreadsheet>)
# 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("Export Spreadsheet") as DHI.Solutions.SpreadsheetManager.UI.Tools.ExportSpreadsheet.IExportSpreadsheet;
// Add input items.
tool.InputItems.Add(<A single spreadsheet>);
// 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.SpreadsheetManager.UI.Tools.ExportSpreadsheet.ExportSpreadsheet"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.SpreadsheetManager.UI.Tools.ExportSpreadsheet.dll" />
Import spreadsheet¶
Tool for importing spreadsheets from disk to MIKE Workbench.
Tool Info | |
---|---|
Display Name | Import spreadsheet |
API Name | Import Spreadsheet |
Tools Explorer | /Import/Import spreadsheet |
NuGet Package | DHI.MikeOperations.SpreadsheetManager.Tools.ImportSpreadsheet |
Assembly name (.dll) | DHI.Solutions.SpreadsheetManager.UI.Tools.ImportSpreadsheet.dll |
API Reference | DHI.Solutions.SpreadsheetManager.UI.Tools.ImportSpreadsheet.IImportSpreadsheet |
Input Items | A single spreadsheet group |
Output Items | A spreadsheet |
Tool Properties
Display Name | API Name | Description |
---|---|---|
Parameters | ||
File Path | FilePath | Gets or sets the file path for the spreadsheet to import |
Group | Group | Gets or sets the group fo the spreadsheet to import |
Name | FileName | Gets or sets the file name of the spreadsheet to import |
Code Sample
import clr
clr.AddReference("DHI.Solutions.SpreadsheetManager.UI.Tools.ImportSpreadsheet")
from DHI.Solutions.SpreadsheetManager.UI.Tools.ImportSpreadsheet import *
# Get the tool.
tool = app.Tools.CreateNew("Import Spreadsheet")
# Add input items.
tool.InputItems.Add(<A single spreadsheet group>)
# 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.SpreadsheetManager.UI.Tools.ImportSpreadsheet")
from DHI.Solutions.SpreadsheetManager.UI.Tools.ImportSpreadsheet import *
# Get the tool.
tool = DHI.Solutions.SpreadsheetManager.UI.Tools.ImportSpreadsheet.IImportSpreadsheet(app.Tools.CreateNew("Import Spreadsheet"))
# Add input items.
tool.InputItems.Add(<A single spreadsheet group>)
# 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("Import Spreadsheet") as DHI.Solutions.SpreadsheetManager.UI.Tools.ImportSpreadsheet.IImportSpreadsheet;
// Add input items.
tool.InputItems.Add(<A single spreadsheet group>);
// 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.SpreadsheetManager.UI.Tools.ImportSpreadsheet.ImportSpreadsheet"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.SpreadsheetManager.UI.Tools.ImportSpreadsheet.dll" />
Spreadsheet Query Tool¶
Tool for querying for spreadsheets.
Tool Info | |
---|---|
Display Name | Spreadsheet Query Tool |
API Name | Spreadsheet query |
Tools Explorer | /Data tools/Spreadsheet Query Tool |
NuGet Package | DHI.MikeOperations.SpreadsheetManager.Tools.Query |
Assembly name (.dll) | DHI.Solutions.SpreadsheetManager.Tools.QueryTool.dll |
API Reference | DHI.Solutions.SpreadsheetManager.Tools.QueryTool.QueryTool |
Input Items | No input items required |
Output Items | List of results |
Tool Properties
Display Name | API Name | Description |
---|---|---|
Query parameters | ||
Metadata | Metadata | Gets or sets the metadata that the spreadsheets should contain. Note that the property is only available when: HasMetadataModule=True |
Name | SpreadsheetName | Gets or sets the name of the speadsheets to search for. Wildcards are supported. |
Within Group | WithinGroup | Gets or sets the group names of time series to search for. Wildcards are supported. |
Code Sample
import clr
clr.AddReference("DHI.Solutions.SpreadsheetManager.Tools.QueryTool")
from DHI.Solutions.SpreadsheetManager.Tools.QueryTool import *
# Get the tool.
tool = app.Tools.CreateNew("Spreadsheet query")
# 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("Spreadsheet query") as DHI.Solutions.SpreadsheetManager.Tools.QueryTool.QueryTool;
// 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.SpreadsheetManager.Tools.QueryTool.QueryTool"
Type="DHI.Solutions.Generic.ITool"
Assembly="DHI.Solutions.SpreadsheetManager.Tools.QueryTool.dll" />