IPCB_LayerIterator interface
An iterator over layers, which can be restricted to a subset of layers with its AddFilter_ methods.
public interface IPCB_LayerIterator
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Derived: IPCB_LayerListIterator, IPCB_LayerObjectIterator, IPCB_LayerObjectIterator_LayerUsage
Remarks
Board and layer stack methods such as IPCB_Board.LayerIterator, IPCB_Board.MechanicalLayerIterator and IPCB_LayerStackBase.Iterator return the derived IPCB_LayerObjectIterator, which also gives the layer object at each position. IPCB_Pad.DefinitionLayerIterator returns an IPCB_LayerIterator.
Filters combine: each AddFilter_ call keeps only the layers that also pass the filters added before it, so for example signal layers combined with mechanical layers leave no layers to visit. Every AddFilter_ method returns this iterator, so calls can be chained.
Methods
| Method | Returns | Description |
|---|---|---|
| AddFilter_ElectricalLayers | IPCB_LayerIterator | Restricts the iteration to electrical layers (signal and internal plane layers) and returns this iterator. |
| AddFilter_InternalPlaneLayers | IPCB_LayerIterator | Restricts the iteration to internal plane layers and returns this iterator. |
| AddFilter_LayerSet | IPCB_LayerIterator | Restricts the iteration to the layers of a layer set and returns this iterator. |
| AddFilter_LayerSet_1 | IPCB_LayerIterator | Restricts the iteration to the layers of a set of layer values and returns this iterator. |
| AddFilter_MechanicalLayers | IPCB_LayerIterator | Restricts the iteration to mechanical layers and returns this iterator. |
| AddFilter_MiscLayers | IPCB_LayerIterator | Restricts the iteration to the layers that are not signal, internal plane, mechanical or dielectric layers, such as the overlay, solder mask, paste mask, keep-out and multi-layer layers, and returns… |
| AddFilter_SignalLayers | IPCB_LayerIterator | Restricts the iteration to signal layers and returns this iterator. |
| First | bool | Moves to the first layer that passes the filters; returns false when there is none. |
| Layer | V7_LayerBase | Returns the layer at the iterator's current position. |
| Next | bool | Moves to the next layer that passes the filters; returns false when there are no more layers. |
| SetBeforeFirst | void | Resets the iterator to the position before the first layer. |
AddFilter_ElectricalLayers
Restricts the iteration to electrical layers (signal and internal plane layers) and returns this iterator.
IPCB_LayerIterator AddFilter_ElectricalLayers();
Returns: IPCB_LayerIterator
Extension method of IPCB_LayerIteratorHelper (using PCB;).
AddFilter_InternalPlaneLayers
Restricts the iteration to internal plane layers and returns this iterator.
IPCB_LayerIterator AddFilter_InternalPlaneLayers();
Returns: IPCB_LayerIterator
Extension method of IPCB_LayerIteratorHelper (using PCB;).
AddFilter_LayerSet
Restricts the iteration to the layers of a layer set and returns this iterator.
IPCB_LayerIterator AddFilter_LayerSet(IPCB_LayerSet argLayerSet);
| Parameter | Type | Passing |
|---|---|---|
argLayerSet | IPCB_LayerSet | value |
Returns: IPCB_LayerIterator
Extension method of IPCB_LayerIteratorHelper (using PCB;).
AddFilter_LayerSet_1
Restricts the iteration to the layers of a set of layer values and returns this iterator.
IPCB_LayerIterator AddFilter_LayerSet_1(TLayerPartitionSet argLayerSet);
| Parameter | Type | Passing |
|---|---|---|
argLayerSet | TLayerPartitionSet | value |
Returns: IPCB_LayerIterator
Extension method of IPCB_LayerIteratorHelper (using PCB;).
Gives the same result as AddFilter_LayerSet with an IPCB_LayerSet that contains the same layers.
AddFilter_MechanicalLayers
Restricts the iteration to mechanical layers and returns this iterator.
IPCB_LayerIterator AddFilter_MechanicalLayers();
Returns: IPCB_LayerIterator
Extension method of IPCB_LayerIteratorHelper (using PCB;).
AddFilter_MiscLayers
Restricts the iteration to the layers that are not signal, internal plane, mechanical or dielectric layers, such as the overlay, solder mask, paste mask, keep-out and multi-layer layers, and returns this iterator.
IPCB_LayerIterator AddFilter_MiscLayers();
Returns: IPCB_LayerIterator
Extension method of IPCB_LayerIteratorHelper (using PCB;).
AddFilter_SignalLayers
Restricts the iteration to signal layers and returns this iterator.
IPCB_LayerIterator AddFilter_SignalLayers();
Returns: IPCB_LayerIterator
Extension method of IPCB_LayerIteratorHelper (using PCB;).
First
Moves to the first layer that passes the filters; returns false when there is none.
bool First();
Returns: bool
Equivalent to SetBeforeFirst followed by Next, so a loop can start with First and call Next at the end of each pass.
Layer
Returns the layer at the iterator's current position.
V7_LayerBase Layer();
Returns: V7_LayerBase
Extension method of IPCB_LayerIteratorHelper (using PCB;).
The position is set by First and Next; read Layer only after one of them returned true.
Next
Moves to the next layer that passes the filters; returns false when there are no more layers.
bool Next();
Returns: bool
After SetBeforeFirst, or when the iterator is new, Next moves to the first layer.
Examples: Extension_InternalPlaneLayer
SetBeforeFirst
Resets the iterator to the position before the first layer.
void SetBeforeFirst();
Returns: nothing (void)
Call Next to move to the first layer.
Examples: Extension_InternalPlaneLayer
Returned by
IPCB_LayerSet.LayerIterator, IPCB_Pad.DefinitionLayerIterator, IPCB_SystemOptions.LayerColorIterator, IPCB_Via.DefinitionLayerIterator