IPCB_ViaTemplate interface
A via template, a reusable set of via properties (hole size, solder mask settings, per-layer diameters and thermal reliefs, and the via structure) that vias can be linked to.
public interface IPCB_ViaTemplate : IPCB_PadViaTemplate
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Inherits: IPCB_PadViaTemplate
Remarks
The template's name, identifiers and library are members of IPCB_PadViaTemplate. IPCB_Board.FindLinkedBoardTemplate returns the template a via is linked to, as an IPCB_PadViaTemplate.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| HoleSize | int | get; set | The size of the via's hole, in internal units (10,000 per mil). |
| IsTenting_Bottom | bool | get; set | Whether the via is tented (covered by solder mask) on the bottom side. |
| IsTenting_Top | bool | get; set | Whether the via is tented (covered by solder mask) on the top side. |
| ManualSolderMask | bool | get; set | Whether the template sets the via's solder mask expansion itself instead of taking it from the design rules. |
| Mode | TPadMode | get; set | How the via's diameter is defined on its layers. |
| SolderMaskBottomExpansion | int | get; set | The solder mask expansion of the via on the bottom side, in internal units (10,000 per mil). |
| SolderMaskExpansion | int | get; set | The solder mask expansion of the via, in internal units (10,000 per mil). |
| SolderMaskHoleEdge | bool | get; set | Whether the via's solder mask expansion is measured from the edge of the hole instead of the edge of the copper. |
| StackData | IPCB_ViaTemplateStackData | get; set | An entry of the template's via stack, which describes the via's diameter and thermal relief on one layer. |
| UseSeparateExpansions | bool | get; set | Whether the via has separate solder mask expansions for the top side (SolderMaskExpansion) and the bottom side (SolderMaskBottomExpansion). |
| ViaStructure | IPCB_ViaStructure | get | The via structure (the via's protection features, such as tenting, plugging or filling) that the template gives its vias. |
HoleSize
The size of the via's hole, in internal units (10,000 per mil).
int GetState_HoleSize();
void SetState_HoleSize(int argValue);
Type: int · Access: read/write
IsTenting_Bottom
Whether the via is tented (covered by solder mask) on the bottom side.
bool GetState_IsTenting_Bottom();
void SetState_IsTenting_Bottom(bool argValue);
Type: bool · Access: read/write
When the template is applied to a via, the setting takes effect only for a via that starts or ends on the bottom layer.
IsTenting_Top
Whether the via is tented (covered by solder mask) on the top side.
bool GetState_IsTenting_Top();
void SetState_IsTenting_Top(bool argValue);
Type: bool · Access: read/write
When the template is applied to a via, the setting takes effect only for a via that starts or ends on the top layer.
ManualSolderMask
Whether the template sets the via's solder mask expansion itself instead of taking it from the design rules.
bool GetState_ManualSolderMask();
void SetState_ManualSolderMask(bool argValue);
Type: bool · Access: read/write
When the value is false, SolderMaskExpansion, SolderMaskBottomExpansion and UseSeparateExpansions are not applied to vias, and the applicable design rule decides the solder mask expansion.
Mode
How the via's diameter is defined on its layers.
TPadMode GetState_Mode();
void SetState_Mode(TPadMode argValue);
Type: TPadMode · Access: read/write
The accessors are extension methods of IPCB_ViaTemplateHelper (using PCB;).
Assigning a different mode replaces the entries of StackData with default entries: one for the top layer for TPadMode.ePadMode_Simple, and one each for the top layer, the mid layers and the bottom layer for TPadMode.ePadMode_LocalStack and TPadMode.ePadMode_ExternalStack. Assigning the current mode changes nothing.
See also: TPadMode
SolderMaskBottomExpansion
The solder mask expansion of the via on the bottom side, in internal units (10,000 per mil).
int GetState_SolderMaskBottomExpansion();
void SetState_SolderMaskBottomExpansion(int argValue);
Type: int · Access: read/write
Applies only when ManualSolderMask is true.
SolderMaskExpansion
The solder mask expansion of the via, in internal units (10,000 per mil).
int GetState_SolderMaskExpansion();
void SetState_SolderMaskExpansion(int argValue);
Type: int · Access: read/write
Applies only when ManualSolderMask is true.
SolderMaskHoleEdge
Whether the via's solder mask expansion is measured from the edge of the hole instead of the edge of the copper.
bool GetState_SolderMaskHoleEdge();
void SetState_SolderMaskHoleEdge(bool argValue);
Type: bool · Access: read/write
StackData
An entry of the template's via stack, which describes the via's diameter and thermal relief on one layer.
IPCB_ViaTemplateStackData GetState_StackData(int argIndex);
void SetState_StackData(int argIndex, IPCB_ViaTemplateStackData argValue);
Type: IPCB_ViaTemplateStackData · Access: read/write · Index: argIndex (int): The zero-based index of the entry, from 0 to StackDataCount - 1.
The accessors are extension methods of IPCB_ViaTemplateHelper (using PCB;).
Reading an entry returns a copy: changes to the returned object take effect only when it is assigned back. Assigning null changes nothing.
When the template is applied to a via, the entry for each layer is found by its IPCB_ViaTemplateStackData.Layer; a layer without an entry gets default values (in TPadMode.ePadMode_ExternalStack, a mid layer without an entry gets the values of the entry for the mid layers). An entry's IPCB_ViaTemplateStackData.ThermalRelief is applied only when its PadViaThermalReliefData.DefinedType is TThermalReliefDefinedType.trdUser.
UseSeparateExpansions
Whether the via has separate solder mask expansions for the top side (SolderMaskExpansion) and the bottom side (SolderMaskBottomExpansion).
bool GetState_UseSeparateExpansions();
void SetState_UseSeparateExpansions(bool argValue);
Type: bool · Access: read/write
Applies only when ManualSolderMask is true.
ViaStructure
The via structure (the via's protection features, such as tenting, plugging or filling) that the template gives its vias.
IPCB_ViaStructure GetState_ViaStructure();
Type: IPCB_ViaStructure · Access: read-only
The accessors are extension methods of IPCB_ViaTemplateHelper (using PCB;).
The returned object is the template's own via structure: changes to it change the template. When the template is applied to a via, the via gets a copy of it; when its IPCB_ViaStructure.StructureType is TViaStructureType.eViaStructureType_None, the via gets no via structure.
Methods
| Method | Returns | Description |
|---|---|---|
| AddStackData | int | Adds a per-layer entry to the template's via stack and returns its index. |
| ClearStackData | void | Removes all entries from the template's via stack. |
| CreateDefaultStackData | IPCB_ViaTemplateStackData | Creates a new via stack entry with default values. |
| StackDataCount | int | Returns the number of entries in the template's via stack. |
AddStackData
Adds a per-layer entry to the template's via stack and returns its index.
int AddStackData(IPCB_ViaTemplateStackData argValue);
int AddStackData(object argValue);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argValue | IPCB_ViaTemplateStackData | value | The entry to add. The template stores a copy of it. |
Returns: int
The first overload is an extension method of IPCB_ViaTemplateHelper (using PCB;) with typed parameters; the second is declared by the interface.
Returns -1 and adds nothing when the value is null.
ClearStackData
Removes all entries from the template's via stack.
void ClearStackData();
Returns: nothing (void)
CreateDefaultStackData
Creates a new via stack entry with default values.
IPCB_ViaTemplateStackData CreateDefaultStackData();
Returns: IPCB_ViaTemplateStackData
Extension method of IPCB_ViaTemplateHelper (using PCB;).
The entry is not added to the template; pass it to AddStackData or assign it to StackData. It has no layer, a diameter of 50 mil and a thermal relief taken from the design rules (TThermalReliefDefinedType.trdRule).
StackDataCount
Returns the number of entries in the template's via stack.
int StackDataCount();
Returns: int