You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This article describes what needs to be done if you want to create an application that uses the OpenDAModelProvider interface of deltashell to work with DS models. I created a windows forms application using the 'zip' file from the nightly build.

Setup

1 Create a folder called D:\ODA
2 Download deltashell.zip and extract it to D:\ODA\shell

Creating the application

3 Create a windows forms application called 'Runner' in D:\ODA\Runner
3.1 Add references to the following assemblies :
Located in D:\ODA\shell\plugins\DeltaShell.Plugins.OpenDA
DeltaShell.Plugins.OpenDA
OpenDA.DotNet.AdditionalInterfaces
D:\ODA\shell\release
OpenMI.Standard2
DelftTools.Shell.Core
DelftTools.Units
DelftTools.Utils
DeltaShell.Core

So your references look like this

Add a button to the form and add the following code to it:

                var provider = new DeltaShell.Plugins.OpenDA.DeltaShellOpenDAModelProvider();
                provider.Initialize(@"D:\ODA", "settings.xml");
                var instance = provider.CreateInstance();
                provider.SaveInstance(instance);

Create the model.

1 Start the loader in D:\ODA\shell\release\DeltaShell.Loader.exe.
2 Add a demo flow model via menu development->'flow model 1d (demo network)'.
3 Rename the model to 'model'.
4 Save the project as model.dsproj in d:\ODA

  • No labels