Skip to content

Getting started

This page gets a working "hello world" running against the SIDRA Intersection API.

Prerequisites

  • SIDRA Intersection installed (the API ships with the product). The installer registers the COM type library (SIDRASolutions.SI.API.tlb) and the .NET COM host (SIDRASolutions.SI.API.comhost.dll).
  • A 64-bit host process. The API is net8.0-windows x64-only and cannot be loaded into a 32-bit process. Set your project's Platform target to x64 (not AnyCPU).
  • .NET 8 runtime present on the machine. The SIDRA Intersection installer satisfies this.
  • A SIDRA project (.sipx) file to open. Save one from SIDRA Intersection, or point the samples at any existing project file.

Add the reference

C# / VB.NET

The API ships with a late-binding wrapper assembly, LB_SI11API.dll, that exposes the SIDRASolutions.SI.API types and loads the installed SIDRA Intersection runtime at run time. Reference it directly instead of going through COM:

  1. Copy LB_SI11API.dll (and its LB_SI11API.deps.json) into your project.
  2. Add an assembly reference to it (a <Reference Include="LB_SI11API"> with a <HintPath>; see the C# sample).
  3. Target net8.0-windows and x64 (not AnyCPU).

Python (Python.NET)

Python does not go through COM. Use Python.NET (pythonnet) to host the .NET 8 runtime and load the API assembly directly:

pip install pythonnet
import os, clr
from pythonnet import set_runtime
from clr_loader import get_coreclr

sidra = r"C:\Program Files\SIDRA SOLUTIONS\SIDRA INTERSECTION 11"

# Host the API's own .NET 8 runtime via its runtimeconfig, then load the DLL.
set_runtime(get_coreclr(
    runtime_config=os.path.join(sidra, "SIDRASolutions.SI.API.runtimeconfig.json")))
clr.AddReference(os.path.join(sidra, "SIDRASolutions.SI.API.dll"))

from SIDRASolutions.SI.API import SIAPI
api = SIAPI()

See the Python sample for locating the install folder from the registry and reading results.

Open a project and read its name

using SIDRASolutions.SI.API;

var api = new SIAPI();
api.OpenProject(@"C:\Samples\MyProject.sipx");

ISIAPIProject project = api.Project;
Console.WriteLine($"Opened: {project.Name}");
Console.WriteLine($"Sites:   {project.SiteFolders.Count}");

The entry interface is always ISIAPI. Once a project is open, ISIAPI.Project returns the ISIAPIProject wrapper which is your gateway to sites, networks, intersections, and analyses.

Next steps

  • Object model: the Project &rarr; Site &rarr; Leg &rarr; Lane hierarchy.
  • C# sample: a runnable console app that opens a project and dumps results.
  • Troubleshooting: if the API fails to load, activate, or open your project.