Skip to content

SIDRA API

Type ISIAPI · Interface
Namespace SIDRASolutions.SI.API
Assembly SIDRASolutions.SI.API.dll
COM CLSID 9C0B1932-3E16-4F86-9365-2E5F752328FC

SIDRA INTERSECTION API wrapper interface.

Declaration

[Guid("9C0B1932-3E16-4F86-9365-2E5F752328FC")]
public interface ISIAPI

Members

Properties

Property Type Summary
Project ISIAPIProject Current open SIDRA INTERSECTION project.
IsLicensed bool Indicates whether the installed version of SIDRA INTERSECTION is licensed.
LastErrorMessage string
IntPtrSize int

Methods

Method Returns Summary
OpenProject(string) bool Opens a SIDRA INTERSECTION Project.
CloseProject() bool Closes the SIDRA INTERSECTION Project and save it.
Close() bool
CreateAndOpenProject(string, string) bool Creates and opens a SIDRA INTERSECTION Project.
SaveProject() bool Save the SIDRA INTERSECTION Project.
CloseProjectWithoutSaving() bool Close the SIDRA INTERSECTION Project without saving it.

Get an instance

// Add a reference to the SIDRA late-binding assembly (LB_SI<version>API.dll).
using SIDRASolutions.SI.API;

var api = new SIAPI();
// #import "SIDRASolutions.SI.API.tlb" raw_interfaces_only
// using namespace SIDRASolutions_SI_API;

CoInitialize(NULL);

CComPtr<ISIAPI> api;
api.CoCreateInstance(__uuidof(SIAPI));
from pythonnet import load
load("coreclr")              # must run before `import clr`

import sys, clr
sys.path.append(r"C:\Program Files\SIDRA INTERSECTION")
clr.AddReference("SIDRASolutions.SI.API")

from SIDRASolutions.SI.API import SIAPI
api = SIAPI()
$api = New-Object -ComObject "SIDRASolutions.SI.API"

Properties

Project

Current open SIDRA INTERSECTION project.

ISIAPIProject Project { get; }

Type ISIAPIProject

Value

If no project is open NULL is returned.

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

IsLicensed

Indicates whether the installed version of SIDRA INTERSECTION is licensed.

bool IsLicensed { get; }

Type bool

Value

True if licensed. False if unlicensed or in Trial Mode.

Code samples
bool isLicensed = api.IsLicensed;
VARIANT_BOOL isLicensed;
api->get_IsLicensed(&isLicensed);
is_licensed = api.IsLicensed
$isLicensed = $api.IsLicensed

LastErrorMessage

string LastErrorMessage { get; }

Type string

Code samples
string lastErrorMessage = api.LastErrorMessage;
CComBSTR lastErrorMessage;
api->get_LastErrorMessage(&lastErrorMessage);
last_error_message = api.LastErrorMessage
$lastErrorMessage = $api.LastErrorMessage

IntPtrSize

int IntPtrSize { get; }

Type int

Code samples
int intPtrSize = api.IntPtrSize;
long intPtrSize;
api->get_IntPtrSize(&intPtrSize);
int_ptr_size = api.IntPtrSize
$intPtrSize = $api.IntPtrSize

Methods

OpenProject(string)

Opens a SIDRA INTERSECTION Project.

bool OpenProject(string filename)

Parameters

Name Type Description
filename string Path of the SIDRA INTERSECTION Project file to open

Returns bool

Code samples
bool result = api.OpenProject(@"C:\path\to\project.sipx");
VARIANT_BOOL result;
api->OpenProject(CComBSTR(L"C:\\path\\to\\project.sipx"), &result);
result = api.OpenProject(r"C:\path\to\project.sipx")
$result = $api.OpenProject("C:\path\to\project.sipx")

CloseProject()

Closes the SIDRA INTERSECTION Project and save it.

bool CloseProject()

Returns bool

Code samples
bool result = api.CloseProject();
VARIANT_BOOL result;
api->CloseProject(&result);
result = api.CloseProject()
$result = $api.CloseProject()

Close()

bool Close()

Returns bool

Code samples
bool result = api.Close();
VARIANT_BOOL result;
api->Close(&result);
result = api.Close()
$result = $api.Close()

CreateAndOpenProject(string, string)

Creates and opens a SIDRA INTERSECTION Project.

bool CreateAndOpenProject(string filename, string newProjectName)

Parameters

Name Type Description
filename string Path of the SIDRA INTERSECTION Project file to open
newProjectName string The Project name

Returns bool

Code samples
bool result = api.CreateAndOpenProject(@"C:\path\to\project.sipx", @"Demo Project");
VARIANT_BOOL result;
api->CreateAndOpenProject(CComBSTR(L"C:\\path\\to\\project.sipx"), CComBSTR(L"Demo Project"), &result);
result = api.CreateAndOpenProject(r"C:\path\to\project.sipx", r"Demo Project")
$result = $api.CreateAndOpenProject("C:\path\to\project.sipx", "Demo Project")

SaveProject()

Save the SIDRA INTERSECTION Project.

bool SaveProject()

Returns bool

Code samples
bool result = api.SaveProject();
VARIANT_BOOL result;
api->SaveProject(&result);
result = api.SaveProject()
$result = $api.SaveProject()

CloseProjectWithoutSaving()

Close the SIDRA INTERSECTION Project without saving it.

bool CloseProjectWithoutSaving()

Returns bool

Code samples
bool result = api.CloseProjectWithoutSaving();
VARIANT_BOOL result;
api->CloseProjectWithoutSaving(&result);
result = api.CloseProjectWithoutSaving()
$result = $api.CloseProjectWithoutSaving()