IPCB_LayerSet interface
A set of PCB layers, for example to restrict an iterator to those layers with IPCB_AbstractIterator.AddFilter_IPCB_LayerSet.
public interface IPCB_LayerSet
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Remarks
New layer sets are created with IPCB_LayerSetUtils (from IPCB_ServerInterface.LayerSet), for example with CreateLayerSet, EmptySet or AllLayers.
A set keeps signal, mechanical, internal plane, standard and dielectric layers as separate groups. A group is either included as a whole (IncludeSignalLayers and similar), with individual layers then excluded from it by Exclude, or not included, with individual layers added by Include. Including or excluding a whole group discards the individual exceptions recorded for that group.
Include, Exclude and the methods that include or exclude a whole group change this set and return it, so calls can be chained. Complement, Intersection, Union and Replicate return a new set and leave this set unchanged.
Methods
| Method | Returns | Description |
|---|---|---|
| Complement | IPCB_LayerSet | Returns a new set that contains exactly the layers this set does not contain. |
| Contains | bool | Returns whether the set contains the given layer. |
| ContainsInternalPlaneLayers | bool | Returns true when the set includes the internal plane layers as a group or contains at least one internal plane layer added individually. |
| EqualTo | bool | Returns whether this set and the given set contain exactly the same layers. |
| EqualTo_1 | bool | Returns whether the set contains exactly the layers of the given set of layer values. |
| Exclude | IPCB_LayerSet | Removes the given layer from the set and returns the set. |
| Exclude_1 | IPCB_LayerSet | Removes each layer of the given set of layer values from the set and returns the set. |
| ExcludeAllLayers | IPCB_LayerSet | |
| ExcludeInternalPlaneLayers | IPCB_LayerSet | Removes all internal plane layers from the set, including those added individually, and returns the set. |
| ExcludeMechanicalLayers | IPCB_LayerSet | Removes all mechanical layers from the set, including those added individually, and returns the set. |
| ExcludeSignalLayers | IPCB_LayerSet | Removes all signal layers from the set, including those added individually, and returns the set. |
| GetFirstLayer | V7_LayerBase | Returns one layer of the set, or no layer when the set is empty. |
| Include | IPCB_LayerSet | Adds the given layer to the set and returns the set. |
| IncludeAllLayers | IPCB_LayerSet | Includes the signal, internal plane, mechanical and standard layer groups as a whole and returns the set. |
| IncludeInternalPlaneLayers | IPCB_LayerSet | Adds all internal plane layers to the set and returns the set. |
| IncludeMechanicalLayers | IPCB_LayerSet | Adds all mechanical layers to the set and returns the set. |
| IncludeMiscLayers | IPCB_LayerSet | Adds all standard layers to the set and returns the set; the same as IncludeStandardLayers. |
| IncludeSignalLayers | IPCB_LayerSet | Adds all signal layers to the set and returns the set. |
| IncludeStandardLayers | IPCB_LayerSet | Adds all standard layers to the set and returns the set. |
| Intersection | IPCB_LayerSet | Returns a new set with the layers that are in both this set and the given set. |
| IsAllLayers | bool | Returns true when the set includes every layer group (signal, mechanical, internal plane, standard and dielectric layers) as a whole, with no layer excluded. |
| IsEmpty | bool | Returns true when the set contains no layer. |
| IsFinite | bool | Returns false when the set includes at least one layer group as a whole with no layer excluded from it; otherwise true. |
| LayerIterator | IPCB_LayerIterator | Returns an iterator over the layers of the set. |
| Replicate | IPCB_LayerSet | Returns an independent copy of the set; changing the copy does not change this set. |
| SerializeToString | string | Returns the set as a string from which IPCB_LayerSetUtils.SerializeFromString creates an equal set. |
| ToString | string | Returns a readable description of the set, listing for each layer group whether the whole group is included and which layers are included or excluded individually. |
| Union | IPCB_LayerSet | Returns a new set with the layers that are in this set, in the given set, or in both. |
Complement
Returns a new set that contains exactly the layers this set does not contain.
IPCB_LayerSet Complement();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
Contains
Returns whether the set contains the given layer.
bool Contains(V7_LayerBase argL);
bool Contains(IV7_Layer argL);
| Parameter | Type | Passing |
|---|---|---|
argL | V7_LayerBase | value |
Returns: bool
The first overload is an extension method of IPCB_LayerSetHelper (using PCB;) with typed parameters; the second is declared by the interface.
ContainsInternalPlaneLayers
Returns true when the set includes the internal plane layers as a group or contains at least one internal plane layer added individually.
bool ContainsInternalPlaneLayers();
Returns: bool
EqualTo
Returns whether this set and the given set contain exactly the same layers.
bool EqualTo(IPCB_LayerSet argLayerSet);
bool EqualTo(object argLayerSet);
| Parameter | Type | Passing |
|---|---|---|
argLayerSet | IPCB_LayerSet | value |
Returns: bool
The first overload is an extension method of IPCB_LayerSetHelper (using PCB;) with typed parameters; the second is declared by the interface.
EqualTo_1
Returns whether the set contains exactly the layers of the given set of layer values.
bool EqualTo_1(TLayerPartitionSet argLayerSet);
bool EqualTo_1(ITransportSet argLayerSet);
| Parameter | Type | Passing |
|---|---|---|
argLayerSet | TLayerPartitionSet | value |
Returns: bool
The first overload is an extension method of IPCB_LayerSetHelper (using PCB;) with typed parameters; the second is declared by the interface.
Exclude
Removes the given layer from the set and returns the set.
IPCB_LayerSet Exclude(V7_LayerBase argL);
| Parameter | Type | Passing |
|---|---|---|
argL | V7_LayerBase | value |
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
Exclude_1
Removes each layer of the given set of layer values from the set and returns the set.
IPCB_LayerSet Exclude_1(TLayerPartitionSet argLayerSet);
| Parameter | Type | Passing |
|---|---|---|
argLayerSet | TLayerPartitionSet | value |
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
ExcludeAllLayers
No description yet.
IPCB_LayerSet ExcludeAllLayers();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
ExcludeInternalPlaneLayers
Removes all internal plane layers from the set, including those added individually, and returns the set.
IPCB_LayerSet ExcludeInternalPlaneLayers();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
ExcludeMechanicalLayers
Removes all mechanical layers from the set, including those added individually, and returns the set.
IPCB_LayerSet ExcludeMechanicalLayers();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
ExcludeSignalLayers
Removes all signal layers from the set, including those added individually, and returns the set.
IPCB_LayerSet ExcludeSignalLayers();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
GetFirstLayer
Returns one layer of the set, or no layer when the set is empty.
V7_LayerBase GetFirstLayer();
Returns: V7_LayerBase
Extension method of IPCB_LayerSetHelper (using PCB;).
When IsFinite is true this is the first layer that LayerIterator returns, so for a set that includes a whole layer group with some of its layers excluded the call fails with the same error as LayerIterator. When IsFinite is false it is the first of internal plane 1, mechanical layer 1 and the top overlay that the set contains, or the top layer when it contains none of them.
Include
Adds the given layer to the set and returns the set.
IPCB_LayerSet Include(V7_LayerBase argL);
| Parameter | Type | Passing |
|---|---|---|
argL | V7_LayerBase | value |
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
IncludeAllLayers
Includes the signal, internal plane, mechanical and standard layer groups as a whole and returns the set.
IPCB_LayerSet IncludeAllLayers();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
IncludeInternalPlaneLayers
Adds all internal plane layers to the set and returns the set.
IPCB_LayerSet IncludeInternalPlaneLayers();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
Internal plane layers excluded individually before the call are included again.
IncludeMechanicalLayers
Adds all mechanical layers to the set and returns the set.
IPCB_LayerSet IncludeMechanicalLayers();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
Mechanical layers excluded individually before the call are included again.
IncludeMiscLayers
Adds all standard layers to the set and returns the set; the same as IncludeStandardLayers.
IPCB_LayerSet IncludeMiscLayers();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
IncludeSignalLayers
Adds all signal layers to the set and returns the set.
IPCB_LayerSet IncludeSignalLayers();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
Signal layers excluded individually before the call are included again.
IncludeStandardLayers
Adds all standard layers to the set and returns the set.
IPCB_LayerSet IncludeStandardLayers();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
Standard layers excluded individually before the call are included again.
Intersection
Returns a new set with the layers that are in both this set and the given set.
IPCB_LayerSet Intersection(IPCB_LayerSet argLayerSet);
| Parameter | Type | Passing |
|---|---|---|
argLayerSet | IPCB_LayerSet | value |
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
IsAllLayers
Returns true when the set includes every layer group (signal, mechanical, internal plane, standard and dielectric layers) as a whole, with no layer excluded.
bool IsAllLayers();
Returns: bool
Returns false for a set made with IncludeAllLayers or IPCB_LayerSetUtils.AllLayers, which do not include the dielectric layers.
IsEmpty
Returns true when the set contains no layer.
bool IsEmpty();
Returns: bool
IsFinite
Returns false when the set includes at least one layer group as a whole with no layer excluded from it; otherwise true.
bool IsFinite();
Returns: bool
A set that includes a whole group with some of its layers excluded counts as finite, but LayerIterator still fails for it.
LayerIterator
Returns an iterator over the layers of the set.
IPCB_LayerIterator LayerIterator();
Returns: IPCB_LayerIterator
Extension method of IPCB_LayerSetHelper (using PCB;).
The call fails with an error when the set includes any layer group as a whole (after IncludeSignalLayers, IncludeAllLayers and similar), even if layers were excluded from that group afterwards. The iterator returns the signal layers first, then the mechanical, internal plane, standard and dielectric layers.
Replicate
Returns an independent copy of the set; changing the copy does not change this set.
IPCB_LayerSet Replicate();
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
SerializeToString
Returns the set as a string from which IPCB_LayerSetUtils.SerializeFromString creates an equal set.
string SerializeToString();
Returns: string
ToString
Returns a readable description of the set, listing for each layer group whether the whole group is included and which layers are included or excluded individually.
string ToString();
Returns: string
Union
Returns a new set with the layers that are in this set, in the given set, or in both.
IPCB_LayerSet Union(IPCB_LayerSet argLayerSet);
| Parameter | Type | Passing |
|---|---|---|
argLayerSet | IPCB_LayerSet | value |
Returns: IPCB_LayerSet
Extension method of IPCB_LayerSetHelper (using PCB;).
Returned by
IPCB_Board.ElectricalLayers, IPCB_Board.MechanicalLayers, IPCB_Board.VisibleLayers, IPCB_BoardLayerSet.GetLayers, IPCB_Factory.AllLayers, IPCB_Factory.CreateLayerSet, IPCB_Factory.CreateLayerSet_1, IPCB_Factory.CreateLayerSet_2, IPCB_Factory.CreateLayerSet_3, IPCB_Factory.SignalLayers, IPCB_GroupComparisionResult.GetTotalLayerSet, IPCB_LayerSetUtils.AllLayers, IPCB_LayerSetUtils.Complement, IPCB_LayerSetUtils.CreateLayerSet, IPCB_LayerSetUtils.EmptySet, IPCB_LayerSetUtils.Factory, IPCB_LayerSetUtils.Factory_1, IPCB_LayerSetUtils.Factory_2, IPCB_LayerSetUtils.Factory_3, IPCB_LayerSetUtils.InternalPlaneLayers, IPCB_LayerSetUtils.Intersection, IPCB_LayerSetUtils.MechanicalLayers, IPCB_LayerSetUtils.NonEditableLayers, IPCB_LayerSetUtils.SerializeFromString, IPCB_LayerSetUtils.SignalLayers, IPCB_LayerSetUtils.StandardLayers, IPCB_LayerSetUtils.Union, IPCB_Viewport.VisibleLayers, IPrintedElectronics.GetDielectricalLayers, IPrintedElectronics.GetDielectricBetweenTwoLayers, IPrintedElectronics.GetElectricalLayers
Accepted by
IPCB_AbstractIterator.AddFilter_IPCB_LayerSet, IPCB_AbstractIterator.AddFilter_LayerSet_1, IPCB_BoardLayerSetManager.NewLayerSetV7, IPCB_BoardLayerSetManager.UpdateLayerSetV7, IPCB_LayerIterator.AddFilter_LayerSet, IPCB_LayerSetUtils.AreDisjoint, IPCB_LayerSetUtils.Complement, IPCB_LayerSetUtils.Equal, IPCB_LayerSetUtils.Intersection, IPCB_LayerSetUtils.SerializeToString, IPCB_LayerSetUtils.Union, IPCB_LayerUtils.FirstLayerInRange, IPCB_ManufactruingRuleList.AddManufacturingRule, IPCB_MasterLayerStack.GetSubstack_1, IPCB_PrimitiveComparator.CompareGroup