Skip to main content
View as Markdown

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​

MethodReturnsDescription
ComplementIPCB_LayerSetReturns a new set that contains exactly the layers this set does not contain.
ContainsboolReturns whether the set contains the given layer.
ContainsInternalPlaneLayersboolReturns true when the set includes the internal plane layers as a group or contains at least one internal plane layer added individually.
EqualToboolReturns whether this set and the given set contain exactly the same layers.
EqualTo_1boolReturns whether the set contains exactly the layers of the given set of layer values.
ExcludeIPCB_LayerSetRemoves the given layer from the set and returns the set.
Exclude_1IPCB_LayerSetRemoves each layer of the given set of layer values from the set and returns the set.
ExcludeAllLayersIPCB_LayerSet
ExcludeInternalPlaneLayersIPCB_LayerSetRemoves all internal plane layers from the set, including those added individually, and returns the set.
ExcludeMechanicalLayersIPCB_LayerSetRemoves all mechanical layers from the set, including those added individually, and returns the set.
ExcludeSignalLayersIPCB_LayerSetRemoves all signal layers from the set, including those added individually, and returns the set.
GetFirstLayerV7_LayerBaseReturns one layer of the set, or no layer when the set is empty.
IncludeIPCB_LayerSetAdds the given layer to the set and returns the set.
IncludeAllLayersIPCB_LayerSetIncludes the signal, internal plane, mechanical and standard layer groups as a whole and returns the set.
IncludeInternalPlaneLayersIPCB_LayerSetAdds all internal plane layers to the set and returns the set.
IncludeMechanicalLayersIPCB_LayerSetAdds all mechanical layers to the set and returns the set.
IncludeMiscLayersIPCB_LayerSetAdds all standard layers to the set and returns the set; the same as IncludeStandardLayers.
IncludeSignalLayersIPCB_LayerSetAdds all signal layers to the set and returns the set.
IncludeStandardLayersIPCB_LayerSetAdds all standard layers to the set and returns the set.
IntersectionIPCB_LayerSetReturns a new set with the layers that are in both this set and the given set.
IsAllLayersboolReturns true when the set includes every layer group (signal, mechanical, internal plane, standard and dielectric layers) as a whole, with no layer excluded.
IsEmptyboolReturns true when the set contains no layer.
IsFiniteboolReturns false when the set includes at least one layer group as a whole with no layer excluded from it; otherwise true.
LayerIteratorIPCB_LayerIteratorReturns an iterator over the layers of the set.
ReplicateIPCB_LayerSetReturns an independent copy of the set; changing the copy does not change this set.
SerializeToStringstringReturns the set as a string from which IPCB_LayerSetUtils.SerializeFromString creates an equal set.
ToStringstringReturns 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.
UnionIPCB_LayerSetReturns 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);
ParameterTypePassing
argLV7_LayerBasevalue

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);
ParameterTypePassing
argLayerSetIPCB_LayerSetvalue

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);
ParameterTypePassing
argLayerSetTLayerPartitionSetvalue

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);
ParameterTypePassing
argLV7_LayerBasevalue

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);
ParameterTypePassing
argLayerSetTLayerPartitionSetvalue

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);
ParameterTypePassing
argLV7_LayerBasevalue

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);
ParameterTypePassing
argLayerSetIPCB_LayerSetvalue

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);
ParameterTypePassing
argLayerSetIPCB_LayerSetvalue

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