
# IPCB_PinPair interface

A pin pair (xSignal) on a PCB document, together with the signal path that connects its pins.

```csharp
public interface IPCB_PinPair
```

**Namespace:** PCB · **Assembly:** Altium.SDK.Interfaces

## Remarks

The pin pairs of a board are reached through [`IPCB_Board.PinPairsManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Board.md#pinpairsmanager), with `PinPairsCount` and `PinPairs` of [`IPCB_PinPairsManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_PinPairsManager.md). An xSignal class is an [`IPCB_ObjectClass`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_ObjectClass.md) whose `MemberKind` is `TClassMemberKind.eClassMemberKind_Signal`; a pin pair is a member of the class when `IsMember` returns true for the pin pair's `Name`.

The signal path is the shortest path between the pins through the board's connectivity, including unrouted connection lines. The lengths, the delay and the primitives of the path are calculated on first use and again after the pin pair has gone out of date; `Rebuild` recalculates them at once.

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [Color](#color) | `uint` | get; set |  |
| [DelayTotal](#delaytotal) | `double` | get | The total propagation delay along the signal path. |
| [Length](#length) | `long` | get | The total length of the signal path between the pins, in internal units (10,000 per mil), routed and unrouted. |
| [Name](#name) | `string` | get; set | The name of the pin pair, which is the xSignal name. |
| [NodeCount](#nodecount) | `int` | get | The number of pins (nodes) of the pin pair. |
| [OverrideColorForDraw](#overridecolorfordraw) | `bool` | get; set |  |
| [PrimitivesCount](#primitivescount) | `int` | get | The number of primitives on the pin pair's signal path. |
| [RoutedLength](#routedlength) | `long` | get | The routed length of the signal path, in internal units (10,000 per mil). |
| [UnroutedLength](#unroutedlength) | `long` | get | The length of the unrouted connection lines on the signal path, in internal units (10,000 per mil). |

### Color

*No description yet.*

```csharp
uint GetState_Color();
void SetState_Color(uint argValue);
```

**Type:** `uint` · **Access:** read/write

### DelayTotal

The total propagation delay along the signal path.

```csharp
double GetState_DelayTotal();
```

**Type:** `double` · **Access:** read-only

Parts of the path inside components are not counted. The value is -1 when the pin pair has no signal path.

### Length

The total length of the signal path between the pins, in internal units (10,000 per mil), routed and unrouted.

```csharp
long GetState_Length();
```

**Type:** `long` · **Access:** read-only

The length includes the pin package length of the pads at the ends of the path and of pads next to a component on the path; parts of the path inside components are not counted. The value is -1 when the pin pair has no signal path.

### Name

The name of the pin pair, which is the xSignal name.

```csharp
string GetState_Name();
void SetState_Name(string argNewName);
```

**Type:** `string` · **Access:** read/write

### NodeCount

The number of pins (nodes) of the pin pair.

```csharp
int GetState_NodeCount();
```

**Type:** `int` · **Access:** read-only

Reading the value does not recalculate the pin pair. `Rebuild` replaces the pins with those on the recalculated signal path, so the value can change after it.

### OverrideColorForDraw

*No description yet.*

```csharp
bool GetState_OverrideColorForDraw();
void SetState_OverrideColorForDraw(bool argValue);
```

**Type:** `bool` · **Access:** read/write

### PrimitivesCount

The number of primitives on the pin pair's signal path.

```csharp
int GetState_PrimitivesCount();
```

**Type:** `int` · **Access:** read-only

### RoutedLength

The routed length of the signal path, in internal units (10,000 per mil).

```csharp
long GetState_RoutedLength();
```

**Type:** `long` · **Access:** read-only

The value is `Length` minus [`UnroutedLength`](#unroutedlength), so it is 0 when the pin pair has no signal path.

### UnroutedLength

The length of the unrouted connection lines on the signal path, in internal units (10,000 per mil).

```csharp
long GetState_UnroutedLength();
```

**Type:** `long` · **Access:** read-only

The value is -1 when the pin pair has no signal path.

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [CastToPrimitive](#casttoprimitive) | [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md) |  |
| [GetPinPairItemDisplayName](#getpinpairitemdisplayname) | `string` | Returns the display name of a primitive, which is its `DescriptorString`. |
| [GetPrimitives](#getprimitives) | [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md) | Returns a primitive on the pin pair's signal path, by index. |
| [Rebuild](#rebuild) | `void` | Recalculates the pin pair's signal path, the list of primitives on it, its lengths and its delay. |

### CastToPrimitive

*No description yet.*

```csharp
IPCB_Primitive CastToPrimitive();
```

**Returns:** [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md)

Extension method of `IPCB_PinPairHelper` (`using PCB;`).

### GetPinPairItemDisplayName

Returns the display name of a primitive, which is its `DescriptorString`.

```csharp
string GetPinPairItemDisplayName(IPCB_Primitive argPrim);
string GetPinPairItemDisplayName(object argPrim);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argPrim` | [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md) | value | The primitive to name, for example one returned by [`GetPrimitives`](#getprimitives). |

**Returns:** `string`

The first overload is an extension method of `IPCB_PinPairHelper` (`using PCB;`) with typed parameters; the second is declared by the interface.

Returns an empty string when no primitive is given.

### GetPrimitives

Returns a primitive on the pin pair's signal path, by index.

```csharp
IPCB_Primitive GetPrimitives(int argIndex);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argIndex` | `int` | value | The zero-based index of the primitive. |

**Returns:** [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md)

Extension method of `IPCB_PinPairHelper` (`using PCB;`).

Returns null when the index is outside the range 0 to [`PrimitivesCount`](#primitivescount) - 1.

### Rebuild

Recalculates the pin pair's signal path, the list of primitives on it, its lengths and its delay.

```csharp
void Rebuild();
```

**Returns:** nothing (`void`)

## Returned by

[IPCB_PinPairsManager.CreateFromPins](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_PinPairsManager.md#createfrompins), [IPCB_PinPairsManager.CreateFromPinsDescriptors](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_PinPairsManager.md#createfrompinsdescriptors), [IPCB_PinPairsManager.GetPinPairOf](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_PinPairsManager.md#getpinpairof), [IPCB_PinPairsManager.PinPairs](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_PinPairsManager.md#pinpairs)

## Accepted by

[IPCB_PinPairsManager.Delete](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_PinPairsManager.md#delete)
