Sample project guide¶
Learn what each Version 11 sample project demonstrates, which source files to open and what to expect when you run it. The examples cover creating Sites and Networks, working with volume scenarios, and reading results.
Download sample projects (ZIP)
SIDRA INTERSECTION 11. All C#, C++ and Python sample source projects in one ZIP.
New to the API? Start with a short walkthrough to open an existing project and analyse its Sites, then return here for a larger example.
Inside the sample collection¶
The archive contains source code and a Visual Studio solution,
SIAPISamples.sln. It does not include ready-made .sipx files. The C# and
C++ examples create their project files when run; the Python example reads
an existing file.
| Project | What it demonstrates |
|---|---|
| C# | Site and Network creation, lane disciplines, priorities, Volume Bins and Scenarios |
| C++ | Diamond interchange, roundabouts, lane disciplines, priorities, Volume Bins and Scenarios through COM |
| Python | Read Site, movement and lane results from an existing project |
C# and C++ cover many of the same tasks. The standalone signalised Site and additional Site types examples are in C# only. The Python project focuses on reading results. There is no VB.NET project in this ZIP; see C# / VB.NET setup for the shared wrapper.
Before you run¶
- Install and license SIDRA INTERSECTION 11 on 64-bit Windows. Follow Getting started for the runtime requirements.
- Download the sample ZIP using the button above and extract it into a working folder. Keep the project folders and supporting files together.
- Check the file paths in the source. The examples use
C:\Tempby default. Create that folder, or change the paths to a folder you can write to. - Choose a language using the instructions below.
The C# and C++ programs run several examples
Their entry points call the examples in sequence and create and save
.sipx files under C:\Temp. Use a dedicated sample folder and filenames
that do not belong to your working projects. To study one example, edit
the calls in Main() or _tmain(). Keep the interchange example first if
you also run the lane disciplines or priorities examples: both read its
APITest.sipx file.
Open CSharpSample/CSharpSample.csproj in Visual Studio and select an
x64 configuration. It targets net8.0-windows and references
LB_SI11API.dll; the ZIP includes the wrapper and its .deps.json in
the C# project folder. Start reading at Main() in Program.cs, which
lists the examples in run order, then build and run.
Open CppSample/CppSample.vcxproj in Visual Studio and select x64.
The supplied project uses the v143 C++ toolset and ATL. Check the
#import path in CppSIAPI.h against your installed
SIDRASolutions.SI.API.tlb. Start reading at _tmain() in
CppSample.cpp for the run order, then open CppSIAPITest.cpp for the
example implementations. Build and run the project.
Use 64-bit Python and install pythonnet, as explained in the
Python walkthrough. In PythonSample.py, change the path in
PySIAPI.Test() to an existing .sipx file. The default is
C:\Temp\APITest.sipx, which the C# or C++ interchange example can create.
Run the script from the PythonSample folder:
This script reads Sites from the first Site folder. Choose a project
with Sites in that folder, or adapt the folder selection in Test().
Create a signalised Site¶
Build a three-leg signalised intersection from code. This is a useful starting point for understanding how geometry, traffic volumes and signal timing fit together in a Site.
- Language: C#.
- Find it:
CreateSignalsSite()inCSharpSample/Program.cs. - Input: geometry, volumes and timing values defined in the source.
- Result:
C:\Temp\Signals.sipx, containing the Site, with processing status or diagnostic messages in the console.
The example adds legs, approach and exit lanes, an island and lane disciplines. It updates the geometry, enters vehicle and pedestrian volumes, sets opposing pedestrian movements, creates a signal phase sequence and processes the Site.
Read alongside the Site API reference.
Create roundabouts¶
Compare two ways of specifying which movements can use each approach lane. Both examples build roundabout geometry, add traffic volumes and pedestrian crossings, and process the Site.
- Languages: C# and C++.
- Find them:
CreateRoundaboutSite()andCreateRoundaboutSite2()inCSharpSample/Program.csorCppSample/CppSIAPITest.cpp. - Input: roundabout geometry and traffic data defined in the source.
- Results:
C:\Temp\Roundabout.sipxandC:\Temp\Roundabout2.sipx, plus processing status or diagnostics in the console.
The first example sets lane disciplines explicitly. The second uses
SetDefaultLaneDisciplines() to assign them from the geometry. This is a
helper implemented in the sample code, not a method on the SIDRA Site
API. In C++ the helper is in CppSIAPI.cpp.
Look for the splitter islands, roundabout leg parameters and the
UpdateGeometryData() call before movement data is accessed.
Build a freeway diamond interchange¶
Create two signalised Sites, 209W and 209E, and connect them into a
Network named Freeway Diamond Interchange. Use this example to follow
the complete path from individual Site geometry to Network analysis.
- Languages: C# and C++.
- Find it:
CreateFreewayDiamondInterchangeNetwork()inCSharpSample/Program.csorCppSample/CppSIAPITest.cpp. - Input: Site geometry, volumes and signal timing defined in the source.
- Result:
C:\Temp\APITest.sipx, containing the two Sites and their Network, with processing status or diagnostics in the console.
Follow these functions in order:
CreateSite209W()andCreateSite209E()create the two intersections, including lanes, movement classes, volumes and phasing.CreateNetwork()adds the Sites to the Network, connects their legs, creates a Common Control Group with phasing, and adds a route.ProcessNetwork()runs the Network analysis and reports its status.
The C# version also calls AddMoreRoute() to add a reverse-direction route
and process route results after the initial Network analysis.
The saved project is also the default input for the lane disciplines, priorities and Python examples. Read alongside the Network API reference.
Work with Volume Bins and Scenarios¶
Keep traffic volume data in reusable Site Volume Bins, link them to Sites through Site Scenarios, and choose the Site Scenario used by each Site in a Network Scenario.
- Languages: C# and C++.
- Find it:
CreateVolumeBinAndScenarios()inCSharpSample/Program.csorCppSample/CppSIAPITest.cpp. - Input: volume data and signalised Site geometry defined in the source.
- Result:
C:\Temp\VolumeBinTest.sipx, containing Volume Bins, three Sites, a connected Network and Scenarios. The console lists Scenarios, their volume types and analysis selections, plus processing status.
The example follows four stages:
- Create Volume Bin folders and bins, then clone, move and remove bins. Change pedestrian volume data in one bin.
- Create signalised Sites and link them to bins using
AddSiteScenario(). Select Scenarios for analysis and demonstrate cloning, reordering and removing them. - Create a Network and a Network Scenario. Choose a Site Scenario for each Network Site, then add another Site and change its Scenario link.
- Clone, reorder and remove Network Scenarios, process the Network and save the project.
For the underlying objects, see Site Volume Bin, Site Scenario and Network Scenario.
Read lane disciplines and priorities¶
Inspect the movement rules stored in an existing project: which vehicle movements can use each approach lane, and which vehicle or pedestrian movements oppose a vehicle movement.
- Languages: C# and C++.
- Find them:
ReadLaneDisciplines()andReadPrioritiesData()inCSharpSample/Program.csorCppSample/CppSIAPITest.cpp. - Input:
C:\Temp\APITest.sipx, created by the interchange example. Both routines read Sites in its first Site folder. - Result: lane discipline and opposing movement information printed to the console. These routines close the project without saving.
These examples read input settings. For calculated flows, capacities and degree of saturation, use the Python results example.
Create additional Site types¶
Explore AddSiteWithGeometry() to create Sites with predefined geometry,
including interchange, pedestrian crossing, arterial and freeway types.
The example also creates a turbo roundabout, supplies its traffic volumes
and pedestrian crossing data, and processes that Site.
- Language: C#.
- Find it:
CreateNewTypeSite()inCSharpSample/Program.cs. - Input: Site type choices and traffic data defined in the source.
- Result:
C:\Temp\CreateNewTypeSites.sipx, containing Sites for type values 5 through 12 and the turbo roundabout (type 13). Only the turbo roundabout is processed by this routine.
See AddSiteWithGeometry for the Site type values and geometry options.
Read detailed results with Python¶
Read more than the two summary values shown in the short website walkthrough. This script traverses Sites in the first Site folder of an existing project and prints results at several levels.
- Language: Python with Python.NET.
- Find it:
PySIAPI.Test()inPythonSample/PythonSample.py. - Input: an existing
.sipxfile; the default isC:\Temp\APITest.sipx. - Result: console output showing movement classes, results timestamps, Site totals, movement results and lane results.
| Function | Results it reads |
|---|---|
__ReadIntersectionOutput() |
Vehicle, pedestrian and person travel speeds and demand flows |
__ReadMovementOutput() |
Leg degree of saturation; movement IDs, turns, flows, heavy vehicle percentages and degree of saturation |
__ReadLaneOutput() |
Lane flows, heavy vehicle percentages, capacity and degree of saturation |
The script processes a Site only when its Outputset is missing. Existing
results are read as supplied by the project. It reports diagnostics if
processing fails and closes the API when finished.
For the results hierarchy, see the Outputset API reference.
Version and coverage¶
This guide describes the public Version 11 ZIP reviewed on 12 September 2026. The examples above are identified from its source code; successful execution still depends on your installed version, licence and local setup.
The reviewed ZIP has no separate Assign Network or Assign Volume Bin example. For help finding an example for these tasks, contact SIDRA SOLUTIONS. For earlier product versions, use Previous versions.