
# IPCB_LayerStack_V7 interface

The layer stack of a board in the version 7 layer model, deprecated; [`IPCB_Board.LayerStack_V7`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Board.md#layerstack_v7) returns it.

```csharp
public interface IPCB_LayerStack_V7
```

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

## Remarks

It is the same master layer stack that [`IPCB_Board.MasterStack`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Board.md#masterstack) returns as an [`IPCB_MasterLayerStack`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_MasterLayerStack.md). The layer walk with [`FirstLayer`](#firstlayer), [`NextLayer`](#nextlayer), [`PreviousLayer`](#previouslayer) and [`LastLayer`](#lastlayer) visits the electrical layers of the stack: signal layers and internal planes.

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [Board](#board) | [IPCB_Board](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Board.md) | get |  |
| [DielectricBottom](#dielectricbottom) | [IPCB_DielectricObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_DielectricObject.md) | get | The bottom solder mask layer of the layer stack, or null when the stack has none. |
| [DielectricTop](#dielectrictop) | [IPCB_DielectricObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_DielectricObject.md) | get | The top solder mask layer of the layer stack, or null when the stack has none. |
| [LayerObject](#layerobject) | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | get | The layer object of the given layer, or null when the layer stack has none for it. |
| [LayerObject_V7](#layerobject_v7) | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | get | The layer object of the given layer, or null when the layer stack has none for it. |
| [LayerStackStyle](#layerstackstyle) | [TLayerStackStyle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TLayerStackStyle.md) | get; set | The layer stack style of the master layer stack. |
| [ShowBotDielectric](#showbotdielectric) | `bool` | get; set |  |
| [ShowTopDielectric](#showtopdielectric) | `bool` | get; set |  |

### Board

*No description yet.*

```csharp
IPCB_Board GetState_Board();
```

**Type:** [IPCB_Board](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Board.md) · **Access:** read-only

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

### DielectricBottom

The bottom solder mask layer of the layer stack, or null when the stack has none.

```csharp
IPCB_DielectricObject GetState_DielectricBottom();
```

**Type:** [IPCB_DielectricObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_DielectricObject.md) · **Access:** read-only

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

### DielectricTop

The top solder mask layer of the layer stack, or null when the stack has none.

```csharp
IPCB_DielectricObject GetState_DielectricTop();
```

**Type:** [IPCB_DielectricObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_DielectricObject.md) · **Access:** read-only

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

### LayerObject

The layer object of the given layer, or null when the layer stack has none for it.

```csharp
IPCB_LayerObject_V7 GetState_LayerObject(TV6_Layer argL);
```

**Type:** [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) · **Access:** read-only · **Index:** `argL` ([TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md)): The layer, from `TV6_Layer.eV6_TopLayer` to `TV6_Layer.eV6_ViaHoleLayer`; any other value returns null.

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

Returns the same object as [`LayerObject_V7`](#layerobject_v7) for the same layer.

### LayerObject_V7

The layer object of the given layer, or null when the layer stack has none for it.

```csharp
IPCB_LayerObject_V7 GetState_LayerObject_V7(V7_LayerBase argL);
```

**Type:** [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) · **Access:** read-only · **Index:** `argL` ([V7_LayerBase](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/V7_LayerBase.md))

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

### LayerStackStyle

The layer stack style of the master layer stack.

```csharp
TLayerStackStyle GetState_LayerStackStyle();
void SetState_LayerStackStyle(TLayerStackStyle argSS);
```

**Type:** [TLayerStackStyle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TLayerStackStyle.md) · **Access:** read/write

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

**See also:** [TLayerStackStyle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TLayerStackStyle.md)

### ShowBotDielectric

*No description yet.*

```csharp
bool GetState_ShowBotDielectric();
void SetState_ShowBotDielectric(bool argValue);
```

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

### ShowTopDielectric

*No description yet.*

```csharp
bool GetState_ShowTopDielectric();
void SetState_ShowTopDielectric(bool argValue);
```

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

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [FirstAvailableInternalPlane](#firstavailableinternalplane) | [IPCB_InternalPlane_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_InternalPlane_V7.md) | Returns the first internal plane layer that is not in the layer stack, or null when every internal plane is in the stack. |
| [FirstAvailableSignalLayer](#firstavailablesignallayer) | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | Returns the first signal layer that is not in the layer stack, or null when every signal layer is in the stack. |
| [FirstLayer](#firstlayer) | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | Returns the first electrical layer (signal layer or internal plane) of the layer stack, or null when the stack has none. |
| [InsertInStackAbove](#insertinstackabove) | `void` | Inserts a signal layer or an internal plane into the layer stack above a reference layer, together with a new dielectric layer below it. |
| [InsertInStackBelow](#insertinstackbelow) | `void` | Inserts a signal layer or an internal plane into the layer stack below a reference layer, together with a new dielectric layer below it. |
| [InsertLayer](#insertlayer) | `void` | Adds a signal layer or an internal plane to the layer stack, together with a new dielectric layer below it, at a position chosen automatically. |
| [LastInternalPlane](#lastinternalplane) | [IPCB_InternalPlane_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_InternalPlane_V7.md) | Returns the last internal plane of the layer stack, or null when the stack has none. |
| [LastLayer](#lastlayer) | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | Returns the last electrical layer (signal layer or internal plane) of the layer stack, or null when the stack has none. |
| [LayersInStackCount](#layersinstackcount) | `int` | Returns the number of electrical layers (signal layers and internal planes) in the layer stack. |
| [NextLayer](#nextlayer) | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | Returns the electrical layer (signal layer or internal plane) that follows the given layer in the layer stack, or null when there is none. |
| [PreviousLayer](#previouslayer) | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | Returns the electrical layer (signal layer or internal plane) that precedes the given layer in the layer stack, or null when there is none. |
| [RemoveFromStack](#removefromstack) | `void` | Removes a signal layer or an internal plane from the layer stack, together with the dielectric layers that directly follow it. |
| [SignalLayerCount](#signallayercount) | `int` | Returns the number of signal layers in the layer stack. |

### FirstAvailableInternalPlane

Returns the first internal plane layer that is not in the layer stack, or null when every internal plane is in the stack.

```csharp
IPCB_InternalPlane_V7 FirstAvailableInternalPlane();
```

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

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

The internal planes are tried in order of their number, starting with internal plane 1.

### FirstAvailableSignalLayer

Returns the first signal layer that is not in the layer stack, or null when every signal layer is in the stack.

```csharp
IPCB_LayerObject_V7 FirstAvailableSignalLayer();
```

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

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

The top layer is tried first, then the mid layers in order of their number, then the bottom layer.

### FirstLayer

Returns the first electrical layer (signal layer or internal plane) of the layer stack, or null when the stack has none.

```csharp
IPCB_LayerObject_V7 FirstLayer();
```

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

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

Continue with [`NextLayer`](#nextlayer) until it returns null to visit every electrical layer.

### InsertInStackAbove

Inserts a signal layer or an internal plane into the layer stack above a reference layer, together with a new dielectric layer below it.

```csharp
void InsertInStackAbove(IPCB_LayerObject_V7 argRefL, IPCB_LayerObject_V7 argL);
void InsertInStackAbove(object argRefL, object argL);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argRefL` | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | value | The layer of the stack above which the layer is inserted. |
| `argL` | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | value | The layer to insert. |

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

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

The new dielectric layer takes its properties from the inserted layer's dielectric. Both layers are enabled in every substack of the master layer stack. Nothing is inserted when the layer is not a signal layer or an internal plane, or when a layer with the same layer ID is already in the stack.

### InsertInStackBelow

Inserts a signal layer or an internal plane into the layer stack below a reference layer, together with a new dielectric layer below it.

```csharp
void InsertInStackBelow(IPCB_LayerObject_V7 argRefL, IPCB_LayerObject_V7 argL);
void InsertInStackBelow(object argRefL, object argL);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argRefL` | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | value | The layer of the stack below which the layer is inserted. |
| `argL` | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | value | The layer to insert. |

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

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

The layer is placed below the reference layer and the dielectric layers that directly follow it. The new dielectric layer takes its properties from the inserted layer's dielectric. Both layers are enabled in every substack of the master layer stack. Nothing is inserted when the layer is not a signal layer or an internal plane, or when a layer with the same layer ID is already in the stack.

### InsertLayer

Adds a signal layer or an internal plane to the layer stack, together with a new dielectric layer below it, at a position chosen automatically.

```csharp
void InsertLayer(TV6_Layer argL);
void InsertLayer(int argL);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argL` | [TV6_Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TV6_Layer.md) | value | The layer to add; only a signal layer or an internal plane is added. |

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

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

An internal plane is placed below the last internal plane of the stack. A signal layer is placed below the last signal layer, counted from the top, whose layer number is not higher than its own. When there is no such layer, the layer is placed below the first electrical layer. Nothing is added when the layer is already in the stack.

### LastInternalPlane

Returns the last internal plane of the layer stack, or null when the stack has none.

```csharp
IPCB_InternalPlane_V7 LastInternalPlane();
```

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

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

### LastLayer

Returns the last electrical layer (signal layer or internal plane) of the layer stack, or null when the stack has none.

```csharp
IPCB_LayerObject_V7 LastLayer();
```

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

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

Continue with [`PreviousLayer`](#previouslayer) until it returns null to visit every electrical layer in reverse order.

### LayersInStackCount

Returns the number of electrical layers (signal layers and internal planes) in the layer stack.

```csharp
int LayersInStackCount();
```

**Returns:** `int`

### NextLayer

Returns the electrical layer (signal layer or internal plane) that follows the given layer in the layer stack, or null when there is none.

```csharp
IPCB_LayerObject_V7 NextLayer(IPCB_LayerObject_V7 argL);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argL` | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | value | The layer to continue from. |

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

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

### PreviousLayer

Returns the electrical layer (signal layer or internal plane) that precedes the given layer in the layer stack, or null when there is none.

```csharp
IPCB_LayerObject_V7 PreviousLayer(IPCB_LayerObject_V7 argL);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argL` | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | value | The layer to continue from. |

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

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

### RemoveFromStack

Removes a signal layer or an internal plane from the layer stack, together with the dielectric layers that directly follow it.

```csharp
void RemoveFromStack(IPCB_LayerObject_V7 argL);
void RemoveFromStack(object argL);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argL` | [IPCB_LayerObject_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LayerObject_V7.md) | value | The layer to remove. |

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

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

Solder mask layers are not removed. Nothing is removed when the layer is not a signal layer or an internal plane.

### SignalLayerCount

Returns the number of signal layers in the layer stack.

```csharp
int SignalLayerCount();
```

**Returns:** `int`

## Returned by

[IPCB_Board.LayerStack_V7](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Board.md#layerstack_v7)
