IPCB_AbstractIterator interface
The base interface of the PCB object iterators, with the filters that select the objects to fetch and the methods that step through them.
public interface IPCB_AbstractIterator
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Derived: IPCB_BoardIterator, IPCB_GroupIterator, IPCB_LibraryIterator, IPCB_SpatialIterator
Remarks
IPCB_BoardIterator, IPCB_SpatialIterator, IPCB_GroupIterator and IPCB_LibraryIterator derive from it. Set the filters, then call FirstPCBObject and NextPCBObject until they return null.
An object is fetched only when it passes every filter: the object kinds, the layers and, for a spatial iterator, the area. Each AddFilter_ObjectSet or AddFilter_LayerSet call replaces the previous filter of the same kind; it does not narrow it.
Methods
| Method | Returns | Description |
|---|---|---|
| AddFilter_AllLayers | void | Removes the layer filter, so that objects on all layers are fetched. |
| AddFilter_Area | void | Restricts a spatial iterator to the objects in a rectangular area. |
| AddFilter_IPCB_LayerSet | void | Restricts the iterator to the objects on the layers of an IPCB_LayerSet, as AddFilter_LayerSet_1 does. |
| AddFilter_LayerSet | void | Restricts the iterator to the objects on the layers of a layer set. |
| AddFilter_LayerSet_1 | void | Restricts the iterator to the objects on the layers of an IPCB_LayerSet. |
| AddFilter_LayerSet_2 | void | |
| AddFilter_ObjectSet | void | Restricts the iterator to objects of the given kinds. |
| FirstPCBObject | IPCB_Primitive | Starts the walk and returns the first object that passes the filters, or null when there is none. |
| NextPCBObject | IPCB_Primitive | Returns the next object that passes the filters, or null when there are no more objects. |
| SetState_FilterAll | void | Removes the object kind filter, so that objects of every kind are fetched again. |
AddFilter_AllLayers
Removes the layer filter, so that objects on all layers are fetched.
void AddFilter_AllLayers();
Returns: nothing (void)
A new group iterator has no layer filter. A new board or spatial iterator fetches objects on all layers except a few system layers, such as TV6_Layer.eV6_PadHoleLayer and TV6_Layer.eV6_ViaHoleLayer.
AddFilter_Area
Restricts a spatial iterator to the objects in a rectangular area.
void AddFilter_Area(int argx1, int argy1, int argx2, int argy2);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argx1 | int | value | X coordinate of one corner of the area, in internal units (10,000 per mil). |
argy1 | int | value | Y coordinate of the same corner, in internal units (10,000 per mil). |
argx2 | int | value | X coordinate of the opposite corner, in internal units (10,000 per mil). |
argy2 | int | value | Y coordinate of the opposite corner, in internal units (10,000 per mil). |
Returns: nothing (void)
The corners can be given in any order. A board iterator ignores the area: use an IPCB_SpatialIterator to fetch the objects in an area. Without this filter, a spatial iterator searches the whole board.
AddFilter_IPCB_LayerSet
Restricts the iterator to the objects on the layers of an IPCB_LayerSet, as AddFilter_LayerSet_1 does.
void AddFilter_IPCB_LayerSet(IPCB_LayerSet argLayerSet);
void AddFilter_IPCB_LayerSet(object argLayerSet);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argLayerSet | IPCB_LayerSet | value | The layers to fetch objects on. |
Returns: nothing (void)
The first overload is an extension method of IPCB_AbstractIteratorHelper (using PCB;) with typed parameters; the second is declared by the interface.
AddFilter_LayerSet
Restricts the iterator to the objects on the layers of a layer set.
void AddFilter_LayerSet(TV6_LayerSet argLayerSet);
void AddFilter_LayerSet(ITransportSet argLayerSet);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argLayerSet | TV6_LayerSet | value | The layers to fetch objects on. |
Returns: nothing (void)
The first overload is an extension method of IPCB_AbstractIteratorHelper (using PCB;) with typed parameters; the second is declared by the interface.
On a board or group iterator, connections are fetched only when the set includes TV6_Layer.eV6_ConnectLayer. Objects that do not belong to a layer (vias, nets, classes, rules, violations, differential pairs, from-tos, embedded objects and the board object) are fetched only when the set includes TV6_Layer.eV6_MultiLayer. Other objects are fetched when the set includes their own layer, so a pad on the multi-layer also needs TV6_Layer.eV6_MultiLayer.
Examples: Extension_PCBUndoRedo
AddFilter_LayerSet_1
Restricts the iterator to the objects on the layers of an IPCB_LayerSet.
void AddFilter_LayerSet_1(IPCB_LayerSet argLayerSet);
void AddFilter_LayerSet_1(object argLayerSet);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argLayerSet | IPCB_LayerSet | value | The layers to fetch objects on. |
Returns: nothing (void)
The first overload is an extension method of IPCB_AbstractIteratorHelper (using PCB;) with typed parameters; the second is declared by the interface.
The layers are matched as described for AddFilter_LayerSet.
AddFilter_LayerSet_2
No description yet.
void AddFilter_LayerSet_2(TLayerPartitionSet argLayerSet);
void AddFilter_LayerSet_2(ITransportSet argLayerSet);
| Parameter | Type | Passing |
|---|---|---|
argLayerSet | TLayerPartitionSet | value |
Returns: nothing (void)
The first overload is an extension method of IPCB_AbstractIteratorHelper (using PCB;) with typed parameters; the second is declared by the interface.
Examples: Extension_BOMManager, Extension_Pad_SolderMask
AddFilter_ObjectSet
Restricts the iterator to objects of the given kinds.
void AddFilter_ObjectSet(TObjectSet argObjectSet);
void AddFilter_ObjectSet(ITransportSet argObjectSet);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argObjectSet | TObjectSet | value | The kinds of objects to fetch. |
Returns: nothing (void)
The first overload is an extension method of IPCB_AbstractIteratorHelper (using PCB;) with typed parameters; the second is declared by the interface.
A new iterator has no object filter. By default, a spatial iterator skips group objects such as components, even when the set includes them (see IPCB_SpatialIterator).
Examples: Extension_BOMManager, Extension_PCBUndoRedo, Extension_Pad_SolderMask
FirstPCBObject
Starts the walk and returns the first object that passes the filters, or null when there is none.
IPCB_Primitive FirstPCBObject();
Returns: IPCB_Primitive
Extension method of IPCB_AbstractIteratorHelper (using PCB;).
Examples: Extension_BOMManager, Extension_PCBUndoRedo, Extension_Pad_SolderMask, Extension_PcbLibComponentToSTEP, Extension_PcbLibToImage
NextPCBObject
Returns the next object that passes the filters, or null when there are no more objects.
IPCB_Primitive NextPCBObject();
Returns: IPCB_Primitive
Extension method of IPCB_AbstractIteratorHelper (using PCB;).
Start the walk with FirstPCBObject; NextPCBObject continues after the object returned last.
Examples: Extension_BOMManager, Extension_PCBUndoRedo, Extension_Pad_SolderMask, Extension_PcbLibComponentToSTEP, Extension_PcbLibToImage
SetState_FilterAll
Removes the object kind filter, so that objects of every kind are fetched again.
void SetState_FilterAll();
Returns: nothing (void)
The other filters depend on the iterator. A board iterator gets the layer filter of a new board iterator back and keeps the setting of IPCB_BoardIterator.AddFilter_Method. A group iterator loses its layer filter. A spatial iterator loses its area filter and keeps its layer filter.