Object model¶
The COM API exposes a tree-shaped object model rooted at
ISIAPI. Each level is a thin COM
wrapper over an internal SIDRA Intersection domain object.
ISIAPI (root, one per process)
Project: ISIAPIProject
SiteFolders: ISIAPISiteFolders
<SiteFolder>: ISIAPISiteFolder
Sites: ISIAPISites
<Site>: ISIAPISite (in SIDRA, a "site" is an intersection)
Legs: ISIAPILegs
<Leg>: ISIAPILeg
LaneApproachs: ISIAPILaneApproachs
LaneExits: ISIAPILaneExits
Islands: ISIAPIIslands
Analysis: ISIAPIAnalysis (analysis parameters for the site)
Outputset: ISIAPIOutputset (results, populated by Site.Process())
DiagnosticMsgs: ISIAPIDiagnosticMsgs
...
NetworkFolders: ISIAPINetworkFolders
<NetworkFolder>: ISIAPINetworkFolder
Networks: ISIAPINetworks
<Network>: ISIAPINetwork
NetworkSites: ISIAPINetworkSites
OutputNetwork: ISIAPIOutputNetwork (results, populated by Network.Process())
...
Note
There is no separate "intersection" object: an ISIAPISite is the
intersection. Its Legs, Analysis, and Outputset describe that
intersection directly.
Conventions¶
I...singular types model a single domain object (ISIAPISite,ISIAPILeg, ...).I...splural types are indexed collections (ISIAPISites,ISIAPILegs, ...). They exposeCountand an indexer; iterate with a plainforloop, because COM collections do not always implementIEnumerable<T>in a way that idiomatic C#foreachexpects.I..._<variant>types model alternative parameter sets or analysis variants (e.g.ISIAPILeg_roundabout,ISIAPILeg_rou_hcm)....MCtypes are Movement Class-specific (heavy vehicles, buses, bicycles, etc.) versions of the corresponding non-MC type.
Lifecycle¶
- Activate the API. There is one
ISIAPIper process. - Open or create a project (
ISIAPI.OpenProject,ISIAPI.CreateAndOpenProject). Until thenISIAPI.Projectand the rest of the navigation tree returnnull. - Read or mutate sites, networks, and parameters via the property tree.
ISIAPISite.Analysisholds the analysis parameters for a site. - Run the analysis with
ISIAPISite.Process()(orISIAPINetwork.Process()for a network). - Read outputs from
ISIAPISite.Outputset(ISIAPINetwork.OutputNetworkfor networks) and theISIAPIOutput*types. - Save with
ISIAPI.SaveProject()and release the COM object.
Threading¶
The API is single-threaded apartment (STA). Marshal calls back onto the
thread that activated ISIAPI, or use a dedicated STA helper thread. Calls
from a worker thread will throw RPC_E_WRONG_THREAD (0x8001010E).