IConnectionsArray interface

Overview 
The IConnectionsArray represents the bus and wire connections in a schematic document. Bus and wire connections that have more than 3 connections could be connected by an automatic junction or a manual junction (placed by an user).

A schematic with valid buses and wires will have connections. An IConnectionsArray interface has all the connections for this schematic sheet and each element in the IConnectionsArray interface is a IConnection interface type.

IConnectionsArray Methods and Properties Table

IConnectionsArray methods

AddConnection
AddConnectionXY
AddConnectionXY_WithSize
GetConnectionAt

GetState_Connection

GetState_ConnectionsCount
GraphicallyInvalidate
RemoveAllConnectionsAt
RemoveAllConnectionsForLine
ResetAllConnections

IConnectionsArray properties

ConnectionsCount
Connection

See also 
IConnection interface
ISch_Sheet interface

IConnectionsArray Methods

AddConnectionXY method

(IConnectionsArray interface)
Syntax 
Procedure AddConnectionXY(X, Y : TCoord);
Description 
This procedure adds a connection with X,Y parameters into the IConnectionsArray object.
See also 
IConnectionsArray interface
AddConnection method

AddConnection method

(IConnectionsArray interface)
Syntax 
Procedure AddConnection (ALocation : TLocation);
Description 
This procedure adds a connection with a location parameter into the IConnectionsArray object.
See also 
IConnectionsArray interface
AddConnectionXY method

GetConnectionAt method

(IConnectionsArray interface)
Syntax 
Function GetConnectionAt(ALocation : TLocation) : IConnection;
Description 
This function retrieves the connection of IConnection type based on the Location parameter.
Example 
Connection := Connections.GetConnectionAt(ALocation);
If Connection <> Nil Then ShowMessage(IntToStr(Connection.ObjectsCount));
See also 
IConnectionsArray interface

GetState_Connection method

(IConnectionsArray interface)
Syntax 
Function GetState_Connection(Index : Integer) : IConnection;
Description 
This function retrieves the indexed connection of IConnection type from the IConnectionsArray interface.
Example 
For J := 0 To TheBusConnections.GetState_ConnectionsCount 
- 1 Do 
Begin 
BusConnection := TheBusConnections.GetState_Connection(J); //IConnection
If BusConnection <> Nil Then 
Begin 
// statements here
End; 
End; 
See also 
IConnectionsArray interface
Connection property

GetState_ConnectionsCount method

(IConnectionsArray interface)
Syntax 
Function GetState_ConnectionsCount : Integer;
Description 
This function returns the number of connections for wires or buses on the schematic sheet. For each 
Example 
For J := 0 To TheBusConnections.GetState_ConnectionsCount 
- 1 Do 
Begin 
BusConnection := TheBusConnections.GetState_Connection(J); //IConnection
If BusConnection <> Nil Then 
Begin 
// statements here
End; 
End; 
See also 
IConnectionsArray interface
ConnectionsCount property

GraphicallyInvalidate method

(IConnectionsArray interface)
Syntax 
Procedure GraphicallyInvalidate;
Description 
This procedure puts the group of design objects (bus or wire objects in an connection array) in an invalid state. A redraw is required to update the schematic sheet.
Example 
TheWireConnections.GraphicallyInvalidate; 
// puts the wires part of the connection group in an invalid state that requires a graphical redraw
See also 
IConnectionsArray interface

RemoveAllConnectionsAt method

(IConnectionsArray interface)
Syntax 
Function RemoveAllConnectionsAt(ALocation : TLocation) : Boolean;
Description 
This function removes all connections at this specified location on the schematic document.
Example 
If BusConnection.ObjectsCount > 1 Then
TheBusConnections.RemoveAllConnectionsAt(BusConnection.Location); 
// BusConnection = IConnection type, TheBusConnections = IConnectionsArray type
See also 
IConnectionsArray interface

RemoveAllConnectionsForLine method

(IConnectionsArray interface)
Syntax 
Function RemoveAllConnectionsForLine(L1, L2 : TLocation) : Boolean;
Description 
This function removes all connections for the specified line with L1 and L2 parameters. If the call was successful, a true value is returned. The Connections can either represent bus or wire connections.
See also 
IConnectionsArray interface

ResetAllConnections method

(IConnectionsArray interface)
Syntax 
Procedure ResetAllConnections;
Description 
This procedure resets all connections (frees all items) in the IConnectionsArray interface for either wire or bus connections.
Example 
TheBusConnections.ResetAllConnections;
//TheBusConnections = IConnectionsArray type
See also 
IConnectionsArray interface

IConnectionsArray Properties

Connection property

(IConnectionsArray interface)
Syntax 
Property Connection : IConnection Read GetState_Connection;
Description

Example 
For J := 0 To TheBusConnections.GetState_ConnectionsCount 
- 1 Do 
Begin 
BusConnection := TheBusConnections.GetState_Connection(J); //IConnection
If BusConnection <> Nil Then 
Begin 
// statements here
End; 
End; 
See also 
IConnectionsArray interface

ConnectionsCount property

(IConnectionsArray interface)
Syntax 
Property ConnectionsCount : Integer Read GetState_ConnectionsCount;
Description

Example 
For J := 0 To TheBusConnections.GetState_ConnectionsCount 
- 1 Do 
Begin 
BusConnection := TheBusConnections.GetState_Connection(J); //IConnection
If BusConnection <> Nil Then 
Begin 
// statements here
End; 
End; 
See also 
IConnectionsArray interface