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
<Site>: ISIAPISite
Intersections: ISIAPIIntersections
<Intersection>: ISIAPIIntersection
Legs: ISIAPILegs
<Leg>: ISIAPILeg
LaneMovements: ISIAPILaneMovements
<LaneMovement>: ISIAPILaneMovement
Islands: ISIAPIIslands
...
NetworkFolders: ISIAPINetworkFolders
<Network>: ISIAPINetwork
Sites: ISIAPISites
...
Analysis: ISIAPIAnalysis
DiagnosticMessages: ISIAPIDiagnosticMsgs
Conventions¶
I...singular types model a single domain object (ISIAPILeg,ISIAPIIntersection, ...).I...splural types are indexed collections (ISIAPILegs,ISIAPIIntersections, ...). They exposeCountand an indexer; iterate with a plainforloop — 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.NewProject). Until then most navigation properties returnnull. - Read or mutate sites, networks, intersections, and parameters via the property tree.
- Run an analysis through
ISIAPIAnalysis. - Read outputs from the corresponding
ISIAPIOutput*types. - Save with
ISIAPIProject.Saveand 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).