First steps

This page explains some of the basic steps to using CPN Tools. If you have never used CPN Tools before, this is a good place to begin. On the CPN Tools Help page, you can find more detailed information about the various aspects of the tool.

If you have problems installing the tool, read the installation page, or report your problems to our Support.

The interface

When you open CPN Tools, the first thing you see is a window, containing an index on the left side and a workspace on the right.

CPN Tools window

To get started working on a CPN, you can either load an existing net or create a new one.

Loading and creating CPNs

To load an existing net, move the cursor to the workspace or to an empty part of the index. Press the right mouse button and keep the button pressed. A circular menu appears - this is the Workspace marking menu. (Read more about these menus on the Marking menus page).

The workspace marking menu

Keep the button pressed and move the cursor to the Load net entry in the menu. The entries will highlight when the cursor moves over them - release the button when the Load net entry is highlighted.

Loading a net through the marking menu

A file dialog appears from which you can select the net you wish to load. When you have selected a net and clicked OK, the dialog disappears, and the net appears in the index at the left side in the CPN Tools window. After a net has been loaded, the name of the net appears as an entry in the index.

Alternatively, you can create a new net by bringing up the Workspace marking menu and selecting the New net entry.

Creating a net through the marking menu

Remember to keep the right mouse button pressed when you move the cursor around in the Marking menus. If you release the button when no entry is highlighted, the menu disappears and no command is invoked. Press down the right button to bring the menu up again.

The index

The index is located in the left side of the CPN Tools window.

The index

The index contains:

  • Tool box: A list of all the tools available in CPN Tools. See the Tool box entry below for more information.
  • Help: Links to Help, Homepage, Report Bug and other web pages. See the Help entry below for more information.
  • Options: Various options, for example, simulation.
  • The nets that are currently open in the tool.

A blue triangle to the left of an entry in the index indicates that the entry can be opened to reveal more details about the entry. Click the triangle to open and close an index entry.

Overview of a net

The index contains an entry for each net that is opened in the tool. If the net was loaded from a file, then the net entry in the index is labeled with the name of the net. In the figure below, the net named “HierarchicalProtocol.cpn” has been loaded. If a new net was created, the net entry is labeled “New net.cpn”.

To start working on a page in the net, the net entry in the index must be opened. The entry may already be opened. Click on the triangle next to the name to open the entry, if it is not already opened.

A net in the index

A net entry contains:

  • History: the list of commands that have been performed on the net;
  • Step: the number of steps that have been executed in a simulation;
  • Time: the current model time;
  • Declarations: the declarations of colour sets, functions, and constant values. All declarations are written in the CPN ML language;
  • Monitors: all Monitors defined for the net; and
  • Page entries for pages in the net.

Read more about how to add/edit declarations and about simulating nets.

All pages in a net are accessible through the index. The hierarchical structure of a net is reflected in the index. The entry for a subpage appears under the entry for its superpage. Subpage entries are visible in the index when the corresponding superpage entry has been opened.

Top page with subpages

Opening the entry for the “Top” page shows that it has four subpages: one instance of page “Sender”, one instance of page “Network” pages, and two instances of page “Receiver”.

If you have created a new net instead of loading an existing one, there will be only one page, called New Page. This page is created automatically with the new net and is empty, so you can start creating net objects on it.

New net with one empty page

Opening a page

To open a page in the net, move the cursor over the name of the page, press down the left mouse button and drag the page name to the workspace. When opening or creating a net, one or more of its pages may already be opened. Here the page named “Top” is being dragged to the workspace. If you have a new net, drag the page “New Page” to the workspace to start creating a net.

Dragging a page to the workspace Dragging the empty page to the workspace

Release the mouse button. The page now appears on the workspace in a binder.

A page in a binder Empty page in binder

If you have dragged the empty page out, you probably want to start creating net objects; see the edit the net page for more information.

Multiple pages and binders

The pages can be dragged from the index to the workspace and dropped in one or more binders. To drop a page in a binder, release the mouse button when the page name is inside the visible area at the top of the binder.

Dropping a page in a binder To drop it in a new binder, drop the name outside of the binder area.

Dropping a page in a new binder

You can place several pages in the same binder, and you can have the same page in more than one binder. A binder can only contain pages from one net.

Pages in binders

To move a page from one binder to another, press with the left mouse button on the page tab at the top left corner of the page and drag the page to an existing binder. You can also put it in a new binder by releasing the page somewhere on the workspace in the same way as when dragging from the index.

Dragging a page to another binder Dragging a page to a new binder

The position of the binders are saved when you save a model.

Tool box

Tools for creating new CPN elements, simulating nets, changing line colors and line widths, etc. are accessible from tool palettes in the tool box in the index and through marking menus on the various objects in the workspace.

To access a tool palette in the index, open the Tool Box entry in the index.

The index tool box

Drag a palette to the workspace the same way as you drag a page: Move the cursor over the name, press the left button, drag the name to the workspace, and release. Like pages, tool palettes can be placed in binders together or separately.

Tool palettes in a binder

Read more about how palettes work, or read about the palettes available in CPN Tools.

To access a tool in a marking menu, press down the right mouse button over an object and choose the command you wish to perform. The marking menus are context-sensitive; that is, their contents change depending on where you bring them up. For example, if you press down the right mouse button in an empty area on a page, a menu will appear with commands for creating new CPN elements: places and transitions.

Page marking menu

Read more about how Marking menus work, or read about the Marking menus available in CPN Tools.


To open a help page from the index drag it to the workspace, like the interaction for opening a page (see Opening a page).

For more information about the Help pages, see the help page for Help entry in index.

Working with CPNs

To create a CPN, you will need to

To improve the readability of the net, you can

To debug and analyze the net, there are facilities for

Example nets

There are numerous example nets included with CPN Tools that illustrate some of the possibilities the program offers. If you are new to CPN Tools or CPNs in general, start by taking a look at some of the simpler examples, such as Simple protocol example or Resource allocation example.