Skip to content

NetworkFolder

Type ISIAPINetworkFolder · Interface
Namespace SIDRASolutions.SI.API
Assembly SIDRASolutions.SI.API.dll
COM CLSID C9D53985-EBE9-45CC-8880-3A5684768C62

NetworkFolder wrapper interface

Declaration

[Guid("C9D53985-EBE9-45CC-8880-3A5684768C62")]
public interface ISIAPINetworkFolder

Members

Properties

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

Methods

Method Returns Summary
AddNetwork(int) ISIAPINetwork Add a new Network into this NetworkFolder. The new Network does not include any Sites. It is created by using a Standard Software Setup.
AddNetwork(string) ISIAPINetwork Add a new Network into this NetworkFolder. The new Network does not include any Sites. It is created by using a User Software Setup or a Standard Software Setup. The Software Setup is identified by the string parameter softwareSetupSignature.
RemoveNetwork(ISIAPINetwork) bool Remove a Network from this NetworkFolder.
CloneNetwork(ISIAPINetwork) ISIAPINetwork Clone a Network.
CloneNetworkWithSites(ISIAPINetwork) ISIAPINetwork Clone a Network with its Sites.
MoveNetworkTo(ISIAPINetwork, int) bool Move a Network to a new position in the same NetworkFolder.
MoveNetworksToFolder(string, ISIAPINetworkFolder) int Move Network(s) from this Network Folder to another Network Folder in this Project.

Properties

Name

NetworkFolder name

string Name { get; set; }

Type string

Value

The NetworkFolder name, max length = 100.

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

Position

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

int Position { get; }

Type int

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

Networks

Collection of Networks in this NetworkFolder

ISIAPINetworks Networks { get; }

Type ISIAPINetworks

Value

Networks collection

Code samples
var networks = networkFolder.Networks;
CComPtr<ISIAPINetworks> networks;
networkFolder->get_Networks(&networks);
networks = networkFolder.Networks
$networks = $networkFolder.Networks

Project

ISIAPIProject Project { get; }

Type ISIAPIProject

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

Methods

AddNetwork(int)

Add a new Network into this NetworkFolder. The new Network does not include any Sites. It is created by using a Standard Software Setup.

ISIAPINetwork AddNetwork(int softwareSetup)

Parameters

Name Type Description
softwareSetup int One of: - Standard Software Setup that is used to create the Network - 1 - Standard Left - 2 - New Zealand - 3 - New South Wales - 4 - Standard Right - 5 - US HCM (Metric) - 6 - US HCM (Customary)

Returns ISIAPINetwork - The new added Network.

Code samples
var result = networkFolder.AddNetwork(0);
CComPtr<ISIAPINetwork> result;
networkFolder->AddNetwork(0, &result);
result = networkFolder.AddNetwork(0)
$result = $networkFolder.AddNetwork(0)

AddNetwork(string)

Add a new Network into this NetworkFolder. The new Network does not include any Sites. It is created by using a User Software Setup or a Standard Software Setup. The Software Setup is identified by the string parameter softwareSetupSignature.

ISIAPINetwork AddNetwork(string softwareSetupSignature)

Parameters

Name Type Description
softwareSetupSignature string The signature string of a User Software Setup or a Standard Software Setup.

Returns ISIAPINetwork - The new added Network.

Code samples
var result = networkFolder.AddNetwork(@"value");
CComPtr<ISIAPINetwork> result;
networkFolder->AddNetwork(CComBSTR(L"value"), &result);
result = networkFolder.AddNetwork(r"value")
$result = $networkFolder.AddNetwork("value")

RemoveNetwork(ISIAPINetwork)

Remove a Network from this NetworkFolder.

bool RemoveNetwork(ISIAPINetwork network)

Parameters

Name Type Description
network ISIAPINetwork The Network to remove.

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

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

CloneNetwork(ISIAPINetwork)

Clone a Network.

ISIAPINetwork CloneNetwork(ISIAPINetwork network)

Parameters

Name Type Description
network ISIAPINetwork The Network to be cloned.

Returns ISIAPINetwork - The new cloned Network.

Remarks

This funciton will create a new Network with the same Sites as those in the original Network, i.e. the Sites will not be cloned.

Code samples
var result = networkFolder.CloneNetwork(null);
CComPtr<ISIAPINetwork> result;
networkFolder->CloneNetwork(NULL, &result);
result = networkFolder.CloneNetwork(None)
$result = $networkFolder.CloneNetwork($null)

CloneNetworkWithSites(ISIAPINetwork)

Clone a Network with its Sites.

ISIAPINetwork CloneNetworkWithSites(ISIAPINetwork network)

Parameters

Name Type Description
network ISIAPINetwork The Network to be cloned.

Returns ISIAPINetwork - The new cloned Network.

Remarks

This function will clone the Network and its Sites as well, i.e. there will be new cloned Sites in the new cloned Network.

Code samples
var result = networkFolder.CloneNetworkWithSites(null);
CComPtr<ISIAPINetwork> result;
networkFolder->CloneNetworkWithSites(NULL, &result);
result = networkFolder.CloneNetworkWithSites(None)
$result = $networkFolder.CloneNetworkWithSites($null)

MoveNetworkTo(ISIAPINetwork, int)

Move a Network to a new position in the same NetworkFolder.

bool MoveNetworkTo(ISIAPINetwork network, int newPosition)

Parameters

Name Type Description
network ISIAPINetwork The Network to move.
newPosition int The zero-based position that the Network should be moved to.

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

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

MoveNetworksToFolder(string, ISIAPINetworkFolder)

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

int MoveNetworksToFolder(string networkNames, ISIAPINetworkFolder destFolder)

Parameters

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

Returns int - The number of successfully moved Networks

Code samples
int result = networkFolder.MoveNetworksToFolder(@"City Network", null);
long result;
networkFolder->MoveNetworksToFolder(CComBSTR(L"City Network"), NULL, &result);
result = networkFolder.MoveNetworksToFolder(r"City Network", None)
$result = $networkFolder.MoveNetworksToFolder("City Network", $null)