IPCB_PadTemplate interface
A pad template, a reusable set of pad properties (layer, hole, offset, solder and paste mask settings and per-layer copper shapes) that pads can be linked to.
public interface IPCB_PadTemplate : 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 pad is linked to, as an IPCB_PadViaTemplate.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| HoleRotation | double | get; set | The rotation of the pad's hole; applies to square and slotted holes. |
| HoleSize | int | get; set | The size of the pad's hole, in internal units (10,000 per mil). |
| HoleType | TExtendedHoleType | get; set | The shape of the pad's hole. |
| HoleWidth | int | get; set | The width of the pad's hole, in internal units (10,000 per mil), used by square and slotted holes. |
| IsMultiLayer | bool | get; set | Whether the template describes a multi-layer (through-hole) pad. |
| IsTenting_Bottom | bool | get; set | Whether the pad is tented (covered by solder mask) on the bottom side. |
| IsTenting_Top | bool | get; set | Whether the pad is tented (covered by solder mask) on the top side. |
| ManualPasteMask | bool | get; set | Whether the template sets the pad's paste mask itself instead of taking it from the design rules. |
| ManualSolderMask | bool | get; set | Whether the template sets the pad's solder mask expansion itself instead of taking it from the design rules. |
| Mode | TPadMode | get; set | How the pad's copper shape and size are defined on its layers. |
| OffsetX | int | get; set | The offset in X of the pad's copper shape from the pad's location on all layers, in internal units (10,000 per mil). |
| OffsetY | int | get; set | The offset in Y of the pad's copper shape from the pad's location on all layers, in internal units (10,000 per mil). |
| PadClass | string | get; set | The name of the pad class that the template puts its pads into; empty for none. |
| PasteMaskExpansion | int | get; set | The paste mask expansion of the pad, in internal units (10,000 per mil). |
| PasteMaskPercent | double | get; set | The paste mask expansion of the pad as a percentage, used when PasteMaskUsePercent is true. |
| PasteMaskUsePercent | bool | get; set | Whether the paste mask expansion is given as a percentage (PasteMaskPercent) instead of a distance (PasteMaskExpansion). |
| Plated | bool | get; set | Whether the pad's hole is plated. |
| SolderMaskBottomExpansion | int | get; set | The solder mask expansion of the pad on the bottom side, in internal units (10,000 per mil). |
| SolderMaskExpansion | int | get; set | The solder mask expansion of the pad, in internal units (10,000 per mil). |
| SolderMaskHoleEdge | bool | get; set | Whether the pad's solder mask expansion is measured from the edge of the hole instead of the edge of the copper. |
| StackData | IPCB_PadTemplateStackData | get; set | An entry of the template's pad stack, which describes the pad's copper shape and size on one layer. |
| UsePaste | bool | get; set | Whether the pad has a paste mask. |
| UseSeparateExpansions | bool | get; set | Whether the pad has separate solder mask expansions for the top side (SolderMaskExpansion) and the bottom side (SolderMaskBottomExpansion). |
HoleRotation
The rotation of the pad's hole; applies to square and slotted holes.
double GetState_HoleRotation();
void SetState_HoleRotation(double argValue);
Type: double · Access: read/write
HoleSize
The size of the pad's hole, in internal units (10,000 per mil).
int GetState_HoleSize();
void SetState_HoleSize(int argValue);
Type: int · Access: read/write
HoleType
The shape of the pad's hole.
TExtendedHoleType GetState_HoleType();
void SetState_HoleType(TExtendedHoleType argValue);
Type: TExtendedHoleType · Access: read/write
The accessors are extension methods of IPCB_PadTemplateHelper (using PCB;).
See also: TExtendedHoleType
HoleWidth
The width of the pad's hole, in internal units (10,000 per mil), used by square and slotted holes.
int GetState_HoleWidth();
void SetState_HoleWidth(int argValue);
Type: int · Access: read/write
IsMultiLayer
Whether the template describes a multi-layer (through-hole) pad.
bool GetState_IsMultiLayer();
void SetState_IsMultiLayer(bool argValue);
Type: bool · Access: read/write
When the template is applied to a pad, a pad that is not on the multi-layer is moved to it when the value is true, and a pad on the multi-layer is moved to the top layer when the value is false.
IsTenting_Bottom
Whether the pad 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 pad, the setting takes effect only for a pad on the multi-layer or the bottom layer.
IsTenting_Top
Whether the pad 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 pad, the setting takes effect only for a pad on the multi-layer or the top layer.
ManualPasteMask
Whether the template sets the pad's paste mask itself instead of taking it from the design rules.
bool GetState_ManualPasteMask();
void SetState_ManualPasteMask(bool argValue);
Type: bool · Access: read/write
When the value is false, PasteMaskExpansion, UsePaste, PasteMaskUsePercent and PasteMaskPercent are not applied to pads, and the applicable design rule decides the paste mask.
ManualSolderMask
Whether the template sets the pad'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 pads, and the applicable design rule decides the solder mask expansion.
Mode
How the pad's copper shape and size are defined on its layers.
TPadMode GetState_Mode();
void SetState_Mode(TPadMode argValue);
Type: TPadMode · Access: read/write
The accessors are extension methods of IPCB_PadTemplateHelper (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
OffsetX
The offset in X of the pad's copper shape from the pad's location on all layers, in internal units (10,000 per mil).
int GetState_OffsetX();
void SetState_OffsetX(int argValue);
Type: int · Access: read/write
OffsetY
The offset in Y of the pad's copper shape from the pad's location on all layers, in internal units (10,000 per mil).
int GetState_OffsetY();
void SetState_OffsetY(int argValue);
Type: int · Access: read/write
PadClass
The name of the pad class that the template puts its pads into; empty for none.
string GetState_PadClass();
void SetState_PadClass(string argValue);
Type: string · Access: read/write
When the template is applied to a pad on a board, the pad is added to the pad class of that name, and the class is created when the board does not have it.
PasteMaskExpansion
The paste mask expansion of the pad, in internal units (10,000 per mil).
int GetState_PasteMaskExpansion();
void SetState_PasteMaskExpansion(int argValue);
Type: int · Access: read/write
Applies only when ManualPasteMask is true.
PasteMaskPercent
The paste mask expansion of the pad as a percentage, used when PasteMaskUsePercent is true.
double GetState_PasteMaskPercent();
void SetState_PasteMaskPercent(double argValue);
Type: double · Access: read/write
Applies only when ManualPasteMask is true.
PasteMaskUsePercent
Whether the paste mask expansion is given as a percentage (PasteMaskPercent) instead of a distance (PasteMaskExpansion).
bool GetState_PasteMaskUsePercent();
void SetState_PasteMaskUsePercent(bool argValue);
Type: bool · Access: read/write
Applies only when ManualPasteMask is true.
Plated
Whether the pad's hole is plated.
bool GetState_Plated();
void SetState_Plated(bool argValue);
Type: bool · Access: read/write
SolderMaskBottomExpansion
The solder mask expansion of the pad 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 pad, 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 pad'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 pad stack, which describes the pad's copper shape and size on one layer.
IPCB_PadTemplateStackData GetState_StackData(int argIndex);
void SetState_StackData(int argIndex, IPCB_PadTemplateStackData argValue);
Type: IPCB_PadTemplateStackData · 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_PadTemplateHelper (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 pad, the entry for each layer is found by its IPCB_PadTemplateStackData.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).
UsePaste
Whether the pad has a paste mask.
bool GetState_UsePaste();
void SetState_UsePaste(bool argValue);
Type: bool · Access: read/write
Applies only when ManualPasteMask is true.
UseSeparateExpansions
Whether the pad 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.
Methods
| Method | Returns | Description |
|---|---|---|
| AddStackData | int | Adds a per-layer entry to the template's pad stack and returns its index. |
| ClearStackData | void | Removes all entries from the template's pad stack. |
| CreateDefaultStackData | IPCB_PadTemplateStackData | Creates a new pad stack entry with default values. |
| StackDataCount | int | Returns the number of entries in the template's pad stack. |
AddStackData
Adds a per-layer entry to the template's pad stack and returns its index.
int AddStackData(IPCB_PadTemplateStackData argValue);
int AddStackData(object argValue);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argValue | IPCB_PadTemplateStackData | value | The entry to add. The template stores a copy of it. |
Returns: int
The first overload is an extension method of IPCB_PadTemplateHelper (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 pad stack.
void ClearStackData();
Returns: nothing (void)
CreateDefaultStackData
Creates a new pad stack entry with default values.
IPCB_PadTemplateStackData CreateDefaultStackData();
Returns: IPCB_PadTemplateStackData
Extension method of IPCB_PadTemplateHelper (using PCB;).
The entry is not added to the template; pass it to AddStackData or assign it to StackData. It has no layer, a TShape.eRounded shape, a size of 60 by 60 mil and a CRPct of 50.
StackDataCount
Returns the number of entries in the template's pad stack.
int StackDataCount();
Returns: int