To Install NModel, you must have .NET. You do not need Visual Studio, but it is convenient to have
for example the express edition of Visual Studio in order to use the solution files (.sln files).

Obtain .NET from Microsoft. The latest version is 3.5. If you already have version 2 or 3, they work too. You may already have .NET; it is included with Vista and with Visual Studio.

From the NModel Releases tab (above) or the Current Release (right), download the runtime binary, NModel.msi. Open the .msi file and follow the prompts. Choose Typical Install.

Executing the .msi file installs the NModel library, the four programs mpv, mp2dot, otg, and ct, and the online help. This is all you need to run the examples, and to create and use your own model programs. This Codeplex site also provides the source code to NModel, but you do not have to build from source to use it.

In order to run mpv (the Model Program Viewer utility), you must also install the graph layout engine GLEE. Notice that GLEE uses a less permissive license than NModel.

After you have installed both NModel and GLEE, you must copy the GLEE DLLs into the NModel bin directory. In a typical installation where both are installed at their default locations, you could accomplish that by

cd C:\Program Files\Microsoft Research\GLEE\bin
copy *.dll ..\..\..\NModel\bin

On Vista you must do this as administrator (open Command Prompt with Run as administrator).

Alternatively to mpv (or in addition to it), you may use mp2dot (Model Program to Dot). The mp2dot program does not require GLEE, and is covered by the more permissive NModel license.

The mp2dot and mpv programs can generate output files in the dot graph layout language. In order to display their contents, you will need programs that can process dot, for example in the Graphviz package. Its GVedit program displays dot and can save files in several formats, including Postscript and SVG. Its dot program also generates Postscript. You can display PostScript in a viewer such as GSView, and display SVG in most browsers (Internet Explorer requires a plugin for this).

The Graphics sample includes a batch command file dotps.bat that generates Postscript from a dot file and optionally displays it, using Graphviz and GSview. There is also mp2ps.bat, which invokes mp2dot then dotps.

It is convenient to add the path C:\Program Files\NModel\bin to the Path environment variable (the .msi file adoes not do this automatically). Then you can use the commands mpv, mp2dot, otg, and ct without prefixing them with the path.

Last edited Feb 28, 2009 at 12:10 AM by jon, version 11

Comments

jpe Jan 5, 2010 at 11:05 AM 
It is possible to run all but mpv.exe using Mono in Linux and Solaris (whereever a recent version of Mono compiles). GLEE dll-s use native calls to Windows GDI libraries and that does not work out of the box with just Mono. You may need to consider a Wine based solution for running mpv on non-windows platforms.

For the time being you need to unpack the files from NModel.msi. It can be done using p7zip with command line "7z x NModel.msi". Then unpack Product.cab with "7z x Product.cab". Next rename the files (they come with dots removed).

pmatos Jun 3, 2009 at 6:04 PM 
igouy, good to know that. How have you obtained the executables? how can you 'unarchive' msi files in linux?

igouy May 22, 2009 at 3:23 AM 
I didn't find anything in the NModel or GLEE license that restricted use to MS Windows - and mpv, mp2dot, otg, and ct all seem to work just fine for me on Ubuntu 9.04 with Mono 2.4

Of course, I do have to change the path separator to get the examples to work.