Skip to content

SiteFolder

Type ISIAPISiteFolder · Interface
Namespace SIDRASolutions.SI.API
Assembly SIDRASolutions.SI.API.dll
COM CLSID 1C46EBD8-6483-441F-8BF6-73B68FA734F2

SiteFolder wrapper interface

Declaration

[Guid("1C46EBD8-6483-441F-8BF6-73B68FA734F2")]
public interface ISIAPISiteFolder

Members

Properties

Property Type Summary
Name string SiteFolder name
Position int This SiteFolder Position in the collection. It is a zero-base integer.
Sites ISIAPISites Collection of Sites in this SiteFolder
Project ISIAPIProject

Methods

Method Returns Summary
AddSite(int, int) ISIAPISite Add a new Site into this SiteFolder. The Site is created automatically without the Geometry data ( e.g. Legs and Lanes) or Phasing and Timing data. The Site is created by using a Standard Software Setup.
AddSite(int, string) ISIAPISite Add a new Site into this SiteFolder. The Site is created automatically without the Geometry data ( e.g. Legs and Lanes) or Phasing and Timing data. The Site is created by using a User Software Setup or a Standard Software Setup. The Software Setup is identified by the string parameter softwareSetupSignature.
AddSiteWithGeometry(int, int, int) ISIAPISite Add a new Site into this SiteFolder. The Site is created automatically with the default Geometry data, e.g. Legs and Lanes. If it is a Signalised Site, the default set of Sequences and Phases are added. The Site is created by using a Standard Software Setup.
AddSiteWithGeometry(int, string, int) ISIAPISite Add a new Site into this SiteFolder. The Site is created automatically with the default Geometry data, e.g. Legs and Lanes. If it is a Signalised Site, the default set of Sequences and Phases are added. The Site is created by using a User Software Setup or a Standard Software Setup. The Software Setup is identified by the string parameter softwareSetupSignature.
RemoveSite(ISIAPISite) bool Remove a Site from this SiteFolder.
CloneSite(ISIAPISite) ISIAPISite Clone a Site.
MoveSiteTo(ISIAPISite, int) bool Move a Site to a new position in the same SiteFolder.
MoveSitesToFolder(string, ISIAPISiteFolder) int Move Site(s) from this Site Folder to another Site Folder in this Project.

Properties

Name

SiteFolder name

string Name { get; set; }

Type string

Value

The SiteFolder name, max length = 100.

Code samples
string name = siteFolder.Name;
siteFolder.Name = @"Example";
CComBSTR name;
siteFolder->get_Name(&name);
siteFolder->put_Name(CComBSTR(L"Example"));
name = siteFolder.Name
siteFolder.Name = r"Example"
$name = $siteFolder.Name
$siteFolder.Name = "Example"

Position

This SiteFolder Position in the collection. It is a zero-base integer.

int Position { get; }

Type int

Code samples
int position = siteFolder.Position;
long position;
siteFolder->get_Position(&position);
position = siteFolder.Position
$position = $siteFolder.Position

Sites

Collection of Sites in this SiteFolder

ISIAPISites Sites { get; }

Type ISIAPISites

Value

Sites collection

Code samples
var sites = siteFolder.Sites;
CComPtr<ISIAPISites> sites;
siteFolder->get_Sites(&sites);
sites = siteFolder.Sites
$sites = $siteFolder.Sites

Project

ISIAPIProject Project { get; }

Type ISIAPIProject

Code samples
var project = siteFolder.Project;
CComPtr<ISIAPIProject> project;
siteFolder->get_Project(&project);
project = siteFolder.Project
$project = $siteFolder.Project

Methods

AddSite(int, int)

Add a new Site into this SiteFolder. The Site is created automatically without the Geometry data ( e.g. Legs and Lanes) or Phasing and Timing data.
The Site is created by using a Standard Software Setup.

ISIAPISite AddSite(int siteType, int softwareSetup)

Parameters

Name Type Description
siteType int One of: - Site Intersection Type: - 0 - At-Grade Intersection - 1 - Roundabout (Unsignalised) - 2 - Giveway / Yield (Two-Way) - 3 - Stop (Two-Way) - 4 - Stop (All-Way) - 7 - Roundabout (Metering Signals)
softwareSetup int One of: - Standard Software Setup that is used to create the Site - 1 - Standard Left - 2 - New Zealand - 3 - New South Wales - 4 - Standard Right - 5 - US HCM (Metric) - 6 - US HCM (Customary)

Returns ISIAPISite - The new added Site.

Remarks

"Single Point Interchange", "Pedestrian Crossing", "Arterial Segment", "Freeway Segment" or "Turbo Roundabout" Site cannot be created by this method. Use the method AddSiteWithGeometry() to add these Sites.

Code samples
var result = siteFolder.AddSite(0, 0);
CComPtr<ISIAPISite> result;
siteFolder->AddSite(0, 0, &result);
result = siteFolder.AddSite(0, 0)
$result = $siteFolder.AddSite(0, 0)

AddSite(int, string)

Add a new Site into this SiteFolder. The Site is created automatically without the Geometry data ( e.g. Legs and Lanes) or Phasing and Timing data.
The Site is created by using a User Software Setup or a Standard Software Setup. The Software Setup is identified by the string parameter softwareSetupSignature.

ISIAPISite AddSite(int siteType, string softwareSetupSignature)

Parameters

Name Type Description
siteType int One of: - Site Intersection Type: - 0 - At-Grade Intersection - 1 - Roundabout (Unsignalised) - 2 - Giveway / Yield (Two-Way) - 3 - Stop (Two-Way) - 4 - Stop (All-Way) - 7 - Roundabout (Metering Signals)
softwareSetupSignature string The signature string of a User Software Setup or a Standard Software Setup.

Returns ISIAPISite - The new added Site.

Remarks

"Single Point Interchange", "Pedestrian Crossing", "Arterial Segment", "Freeway Segment" or "Turbo Roundabout" Site cannot be created by this method. Use the method AddSiteWithGeometry() to add these Sites.

Code samples
var result = siteFolder.AddSite(0, @"value");
CComPtr<ISIAPISite> result;
siteFolder->AddSite(0, CComBSTR(L"value"), &result);
result = siteFolder.AddSite(0, r"value")
$result = $siteFolder.AddSite(0, "value")

AddSiteWithGeometry(int, int, int)

Add a new Site into this SiteFolder. The Site is created automatically with the default Geometry data, e.g. Legs and Lanes. If it is a Signalised Site, the default set of Sequences and Phases are added.
The Site is created by using a Standard Software Setup.

ISIAPISite AddSiteWithGeometry(int siteType, int softwareSetup, int majorRoadOrientation)

Parameters

Name Type Description
siteType int One of: - Site Intersection Type: - 0 - At-Grade Intersection - 1 - Roundabout (Unsignalised) - 2 - Giveway / Yield (Two-Way) - 3 - Stop (Two-Way) - 4 - Stop (All-Way) - 5 - Single Point Interchange (Signals) - 6 - Pedestrian Crossing (Signalised) - 7 - Roundabout (Metering Signals) - 8 - Pedestrian Crossing (Unsignalised) - 9 - Arterial Segment - 10 - Freeway Basic Segment - 11 - Freeway Segment with Ramps (Two-Way) - 12 - Freeway Segment with Ramps (One-Way) - 13 - Turbo Roundabout
softwareSetup int One of: - Standard Software Setup that is used to create the Site - 1 - Standard Left - 2 - New Zealand - 3 - New South Wales - 4 - Standard Right - 5 - US HCM (Metric) - 6 - US HCM (Customary)
majorRoadOrientation int One of: - Major Road Orientation, for Giveway / Yield (Two-Way) or Stop (Two-Way) Site only. This parameter is ignored on the other types of Sites - 0 - Major Road on North and South - 1 - Major Road on NorthWest and SouthEast - 2 - Major Road on East and West - 3 - Major Road on NorthEast and SouthWest

Returns ISIAPISite - The new added Site.

Remarks

If the default Legs do not match the actual Geometry Layout, they can be changed by rotating the Site, removing Leg(s) or adding Leg(s) to the Site.

Code samples
var result = siteFolder.AddSiteWithGeometry(0, 0, 0);
CComPtr<ISIAPISite> result;
siteFolder->AddSiteWithGeometry(0, 0, 0, &result);
result = siteFolder.AddSiteWithGeometry(0, 0, 0)
$result = $siteFolder.AddSiteWithGeometry(0, 0, 0)

AddSiteWithGeometry(int, string, int)

Add a new Site into this SiteFolder. The Site is created automatically with the default Geometry data, e.g. Legs and Lanes. If it is a Signalised Site, the default set of Sequences and Phases are added.
The Site is created by using a User Software Setup or a Standard Software Setup. The Software Setup is identified by the string parameter softwareSetupSignature.

ISIAPISite AddSiteWithGeometry(int siteType, string softwareSetupSignature, int majorRoadOrientation)

Parameters

Name Type Description
siteType int One of: - Site Intersection Type: - 0 - At-Grade Intersection - 1 - Roundabout (Unsignalised) - 2 - Giveway / Yield (Two-Way) - 3 - Stop (Two-Way) - 4 - Stop (All-Way) - 5 - Single Point Interchange (Signals) - 6 - Pedestrian Crossing (Signalised) - 7 - Roundabout (Metering Signals) - 8 - Pedestrian Crossing (Unsignalised) - 9 - Arterial Segment - 10 - Freeway Basic Segment - 11 - Freeway Segment with Ramps (Two-Way) - 12 - Freeway Segment with Ramps (One-Way) - 13 - Turbo Roundabout
softwareSetupSignature string The signature string of a User Software Setup or a Standard Software Setup.
majorRoadOrientation int One of: - Major Road Orientation, for Giveway / Yield (Two-Way) or Stop (Two-Way) Site only. This parameter is ignored on the other types of Sites - 0 - Major Road on North and South - 1 - Major Road on NorthWest and SouthEast - 2 - Major Road on East and West - 3 - Major Road on NorthEast and SouthWest

Returns ISIAPISite - The new added Site.

Remarks

If the default Legs do not match the actual Geometry Layout, they can be changed by rotating the Site, removing Leg(s) or adding Leg(s) to the Site.

Code samples
var result = siteFolder.AddSiteWithGeometry(0, @"value", 0);
CComPtr<ISIAPISite> result;
siteFolder->AddSiteWithGeometry(0, CComBSTR(L"value"), 0, &result);
result = siteFolder.AddSiteWithGeometry(0, r"value", 0)
$result = $siteFolder.AddSiteWithGeometry(0, "value", 0)

RemoveSite(ISIAPISite)

Remove a Site from this SiteFolder.

bool RemoveSite(ISIAPISite site)

Parameters

Name Type Description
site ISIAPISite The Site to remove.

Returns bool - true if the Site is successfully removed; otherwise, false. This method also returns false if the Site does not exist in this SiteFolder.

Remarks

The Site cannot be used in any Networks.

Code samples
bool result = siteFolder.RemoveSite(null);
VARIANT_BOOL result;
siteFolder->RemoveSite(NULL, &result);
result = siteFolder.RemoveSite(None)
$result = $siteFolder.RemoveSite($null)

CloneSite(ISIAPISite)

Clone a Site.

ISIAPISite CloneSite(ISIAPISite site)

Parameters

Name Type Description
site ISIAPISite The Site to be cloned.

Returns ISIAPISite - The new cloned Site.

Code samples
var result = siteFolder.CloneSite(null);
CComPtr<ISIAPISite> result;
siteFolder->CloneSite(NULL, &result);
result = siteFolder.CloneSite(None)
$result = $siteFolder.CloneSite($null)

MoveSiteTo(ISIAPISite, int)

Move a Site to a new position in the same SiteFolder.

bool MoveSiteTo(ISIAPISite site, int newPosition)

Parameters

Name Type Description
site ISIAPISite The Site to move.
newPosition int The zero-based position that the Site should be moved to.

Returns bool - true if the Site is successfully moved; otherwise, false. This method also returns false if the Site does not exist in this SiteFolder.

Code samples
bool result = siteFolder.MoveSiteTo(null, 0);
VARIANT_BOOL result;
siteFolder->MoveSiteTo(NULL, 0, &result);
result = siteFolder.MoveSiteTo(None, 0)
$result = $siteFolder.MoveSiteTo($null, 0)

MoveSitesToFolder(string, ISIAPISiteFolder)

Move Site(s) from this Site Folder to another Site Folder in this Project.

int MoveSitesToFolder(string siteNames, ISIAPISiteFolder destFolder)

Parameters

Name Type Description
siteNames string The name(s) of the Site(s) to move. Use semicolon ";" to separate the names. If a name already has ";", replace each ";" with ";;". For examples:
destFolder ISIAPISiteFolder The destination Site Folder

Returns int - The number of successfully moved Sites

Remarks

If Site(s) to move are used in Network(s). All the Sites in the Network(s) are required to move together to another folder because all Sites in a Network need to be in the same folder.

Code samples
int result = siteFolder.MoveSitesToFolder(@"Main Intersection", null);
long result;
siteFolder->MoveSitesToFolder(CComBSTR(L"Main Intersection"), NULL, &result);
result = siteFolder.MoveSitesToFolder(r"Main Intersection", None)
$result = $siteFolder.MoveSitesToFolder("Main Intersection", $null)