Skip to main content
View as Markdown

IPCB_Connection interface

A connection line between two points on a PCB document, either a ratsnest connection or a broken net marker.

public interface IPCB_Connection : IPCB_Primitive

Namespace: PCB · Assembly: Altium.SDK.Interfaces

Inherits: IPCB_Primitive

Remarks​

Each end of the connection has its own coordinates (X1, Y1 and X2, Y2) and its own layer (Layer1 and Layer2), so the two ends can be on different layers. Mode tells whether the connection is a ratsnest connection or a broken net marker.

A new connection has both ends at (0, 0) on TV6_Layer.eV6_MultiLayer, and its Mode is TConnectionMode.eRatsNestConnection.

Properties​

PropertyTypeAccessDescription
Layer1TV6_Layerget; setThe layer of the connection's first end, (X1, Y1).
Layer2TV6_Layerget; setThe layer of the connection's second end, (X2, Y2).
ModeTConnectionModeget; setWhether the connection is a ratsnest connection or a broken net marker.
X1intget; setThe X coordinate of the connection's first end, in internal units (10,000 per mil).
X2intget; setThe X coordinate of the connection's second end, in internal units (10,000 per mil).
Y1intget; setThe Y coordinate of the connection's first end, in internal units (10,000 per mil).
Y2intget; setThe Y coordinate of the connection's second end, in internal units (10,000 per mil).

Layer1​

The layer of the connection's first end, (X1, Y1).

TV6_Layer GetState_Layer1();
void SetState_Layer1(TV6_Layer argValue);

Type: TV6_Layer · Access: read/write

The accessors are extension methods of IPCB_ConnectionHelper (using PCB;).

Layer2​

The layer of the connection's second end, (X2, Y2).

TV6_Layer GetState_Layer2();
void SetState_Layer2(TV6_Layer argValue);

Type: TV6_Layer · Access: read/write

The accessors are extension methods of IPCB_ConnectionHelper (using PCB;).

Mode​

Whether the connection is a ratsnest connection or a broken net marker.

TConnectionMode GetState_Mode();
void SetState_Mode(TConnectionMode argValue);

Type: TConnectionMode · Access: read/write

The accessors are extension methods of IPCB_ConnectionHelper (using PCB;).

See also: TConnectionMode

X1​

The X coordinate of the connection's first end, in internal units (10,000 per mil).

int GetState_X1();
void SetState_X1(int argValue);

Type: int · Access: read/write

X2​

The X coordinate of the connection's second end, in internal units (10,000 per mil).

int GetState_X2();
void SetState_X2(int argValue);

Type: int · Access: read/write

Y1​

The Y coordinate of the connection's first end, in internal units (10,000 per mil).

int GetState_Y1();
void SetState_Y1(int argValue);

Type: int · Access: read/write

Y2​

The Y coordinate of the connection's second end, in internal units (10,000 per mil).

int GetState_Y2();
void SetState_Y2(int argValue);

Type: int · Access: read/write

Methods​

MethodReturnsDescription
IsRedundantboolReturns whether the connection is redundant.
RotateAroundXYvoidRotates the connection about a point by an angle.

IsRedundant​

Returns whether the connection is redundant.

bool IsRedundant();

Returns: bool

Returns true when both ends are the same point on the same layer.

RotateAroundXY​

Rotates the connection about a point by an angle.

void RotateAroundXY(int argX, int argY, double argngle);
ParameterTypePassingDescription
argXintvalueThe X coordinate of the point to rotate about, in internal units (10,000 per mil).
argYintvalueThe Y coordinate of the point to rotate about, in internal units (10,000 per mil).
argngledoublevalueThe rotation angle, in degrees.

Returns: nothing (void)

Both ends are rotated about the point; their layers do not change. To rotate the connection without moving it, pass its midpoint (midway between X1 and X2, and between Y1 and Y2) as the point.

Inherited members​