Skip to content

Document Manager Tools

Properties of a tool (if any) can be specified in the Properties window in MIKE Workbench.

Document Query Tool

Tool for querying documents.

Tool Info
Display Name Document Query Tool
API Name Document query
Tools Explorer /Data tools/Document Query Tool
NuGet Package DHI.MikeOperations.DocumentManager.Tools.Query
Assembly name (.dll) DHI.Solutions.DocumentManager.Tools.QueryTool.dll
API Reference DHI.Solutions.DocumentManager.Tools.QueryTool.IDocumentQueryTool
Input Items No input items required
Output Items List of results

Tool Properties

Display Name API Name Description
Query parameters
Author Author Gets or sets the auther to limit the search. Wildcards are supported.
Keywords Keywords Gets or sets keywords that documents should contain.
Name DocumentName Gets or sets the name of documents to search for. Wildcards are supported.
Summary Summary Gets or sets a string that the summary of documents should contain.

Code Sample

import clr
clr.AddReference("DHI.Solutions.DocumentManager.Tools.QueryTool")
from DHI.Solutions.DocumentManager.Tools.QueryTool import *

# Get the tool.
tool = app.Tools.CreateNew("Document 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
import clr
clr.AddReference("DHI.Solutions.DocumentManager.Tools.QueryTool")
from DHI.Solutions.DocumentManager.Tools.QueryTool import *

# Get the tool.
tool = DHI.Solutions.DocumentManager.Tools.QueryTool.IDocumentQueryTool(app.Tools.CreateNew("Document 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("Document query") as DHI.Solutions.DocumentManager.Tools.QueryTool.IDocumentQueryTool;
// 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.DocumentManager.Tools.QueryTool.QueryTool"
  Type="DHI.Solutions.Generic.ITool"
  Assembly="DHI.Solutions.DocumentManager.Tools.QueryTool.dll" />

Export document

Tool for exporting documents to files on disk.

Tool Info
Display Name Export document
API Name Export Document
Tools Explorer /Export/Export document
NuGet Package DHI.MikeOperations.DocumentManager.Tools.Export
Assembly name (.dll) DHI.Solutions.DocumentManager.UI.Tools.ExportDocument.dll
API Reference DHI.Solutions.DocumentManager.UI.Tools.ExportDocument.IExportDocument
Input Items One or more documents
Output Items No output items

Tool Properties

Display Name API Name Description
Parameters
File Path FilePath Gets or sets the file path fo the document to export

Code Sample

import clr
clr.AddReference("DHI.Solutions.DocumentManager.UI.Tools.ExportDocument")
from DHI.Solutions.DocumentManager.UI.Tools.ExportDocument import *

# Get the tool.
tool = app.Tools.CreateNew("Export Document")
# Add input items.
tool.InputItems.Add(<One or more documents>)
# 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.DocumentManager.UI.Tools.ExportDocument")
from DHI.Solutions.DocumentManager.UI.Tools.ExportDocument import *

# Get the tool.
tool = DHI.Solutions.DocumentManager.UI.Tools.ExportDocument.IExportDocument(app.Tools.CreateNew("Export Document"))
# Add input items.
tool.InputItems.Add(<One or more documents>)
# 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 Document") as DHI.Solutions.DocumentManager.UI.Tools.ExportDocument.IExportDocument;
// Add input items.
tool.InputItems.Add(<One or more documents>);
// 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.DocumentManager.UI.Tools.ExportDocument.ExportDocument"
  Type="DHI.Solutions.Generic.ITool"
  Assembly="DHI.Solutions.DocumentManager.UI.Tools.ExportDocument.dll" />

Import document

Tool for importing documents into the MIKE OPERATIONS database.

Tool Info
Display Name Import document
API Name Import Document
Tools Explorer /Import/Import document
NuGet Package DHI.MikeOperations.DocumentManager.Tools.Import
Assembly name (.dll) DHI.Solutions.DocumentManager.UI.Tools.ImportDocument.dll
API Reference DHI.Solutions.DocumentManager.UI.Tools.ImportDocument.IImportDocument
Input Items A single document folder
Output Items A document

Tool Properties

Display Name API Name Description
Parameters
Document Path FilePath Gets or sets the file path for the document to import
Group Group Gets or sets the group for the document to import
Name DocumentName Gets or sets the name for the document to import

Code Sample

import clr
clr.AddReference("DHI.Solutions.DocumentManager.UI.Tools.ImportDocument")
from DHI.Solutions.DocumentManager.UI.Tools.ImportDocument import *

# Get the tool.
tool = app.Tools.CreateNew("Import Document")
# Add input items.
tool.InputItems.Add(<A single document folder>)
# 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.DocumentManager.UI.Tools.ImportDocument")
from DHI.Solutions.DocumentManager.UI.Tools.ImportDocument import *

# Get the tool.
tool = DHI.Solutions.DocumentManager.UI.Tools.ImportDocument.IImportDocument(app.Tools.CreateNew("Import Document"))
# Add input items.
tool.InputItems.Add(<A single document folder>)
# 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 Document") as DHI.Solutions.DocumentManager.UI.Tools.ImportDocument.IImportDocument;
// Add input items.
tool.InputItems.Add(<A single document folder>);
// 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.DocumentManager.UI.Tools.ImportDocument.ImportDocument"
  Type="DHI.Solutions.Generic.ITool"
  Assembly="DHI.Solutions.DocumentManager.UI.Tools.ImportDocument.dll" />