IPCB_PadViaTemplate interface
The common base of pad templates (IPCB_PadTemplate) and via templates (IPCB_ViaTemplate), with the identity, name and description they share.
public interface IPCB_PadViaTemplate
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Derived: IPCB_PadTemplate, IPCB_ViaTemplate
Remarks
IPCB_Board.FindLinkedBoardTemplate returns the template a pad or via is linked to as an IPCB_PadViaTemplate; ObjectID tells a pad template from a via template.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| ExternalLink | IPCB_PadViaTemplateLink | get | The template's external link, which holds the library, template and revision identifiers of an external template. |
| Internal | bool | get; set | |
| LibraryID | string | get; set | The identifier of the pad and via library that the template belongs to. |
| ObjectID | TObjectId | get | The object type of the template, TObjectId.ePadObject for a pad template and TObjectId.eViaObject for a via template. |
| PrimLinkCount | int | get | The number of pads or vias that are linked to the template. |
| RemoveUnused | bool | get; set | |
| RevisionID | string | get; set | The revision identifier of the template. |
| TemplateDescription | string | get; set | The free-text description of the template. |
| TemplateID | string | get; set | The identifier of the template within its library. |
| TemplateName | string | get; set | The display name of the template. |
ExternalLink
The template's external link, which holds the library, template and revision identifiers of an external template.
IPCB_PadViaTemplateLink GetState_ExternalLink();
Type: IPCB_PadViaTemplateLink · Access: read-only
The accessors are extension methods of IPCB_PadViaTemplateHelper (using PCB;).
The returned object is the template's own link, not a copy. Its identifiers are empty for a new template.
Internal
No description yet.
bool GetState_Internal();
void SetState_Internal(bool argValue);
Type: bool · Access: read/write
LibraryID
The identifier of the pad and via library that the template belongs to.
string GetState_LibraryID();
void SetState_LibraryID(string argValue);
Type: string · Access: read/write
Empty for a new template.
ObjectID
The object type of the template, TObjectId.ePadObject for a pad template and TObjectId.eViaObject for a via template.
TObjectId GetState_ObjectID();
Type: TObjectId · Access: read-only
The accessors are extension methods of IPCB_PadViaTemplateHelper (using PCB;).
PrimLinkCount
The number of pads or vias that are linked to the template.
int GetState_PrimLinkCount();
Type: int · Access: read-only
RemoveUnused
No description yet.
bool GetState_RemoveUnused();
void SetState_RemoveUnused(bool argValue);
Type: bool · Access: read/write
RevisionID
The revision identifier of the template.
string GetState_RevisionID();
void SetState_RevisionID(string argValue);
Type: string · Access: read/write
Empty for a new template.
TemplateDescription
The free-text description of the template.
string GetState_TemplateDescription();
void SetState_TemplateDescription(string argValue);
Type: string · Access: read/write
Empty for a new template.
TemplateID
The identifier of the template within its library.
string GetState_TemplateID();
void SetState_TemplateID(string argValue);
Type: string · Access: read/write
A new template gets a newly generated GUID string.
TemplateName
The display name of the template.
string GetState_TemplateName();
void SetState_TemplateName(string argValue);
Type: string · Access: read/write
Methods
| Method | Returns | Description |
|---|---|---|
| CreateTemplateLink | IPCB_PadViaTemplateLink | Creates a new template link that holds the template's LibraryID, TemplateID and RevisionID. |
| GetFullTemplateID | string | Returns the template's full identifier, its LibraryID and TemplateID joined by @. |
| HasLocalChanges | bool | Returns whether a pad or via differs from the template. |
CreateTemplateLink
Creates a new template link that holds the template's LibraryID, TemplateID and RevisionID.
IPCB_PadViaTemplateLink CreateTemplateLink();
Returns: IPCB_PadViaTemplateLink
Extension method of IPCB_PadViaTemplateHelper (using PCB;).
The link is a separate object; changing it does not change the template.
GetFullTemplateID
Returns the template's full identifier, its LibraryID and TemplateID joined by @.
string GetFullTemplateID();
Returns: string
HasLocalChanges
Returns whether a pad or via differs from the template.
bool HasLocalChanges(IPCB_Primitive argPrimitive);
bool HasLocalChanges(object argPrimitive);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argPrimitive | IPCB_Primitive | value | The pad or via to compare with the template. |
Returns: bool
The first overload is an extension method of IPCB_PadViaTemplateHelper (using PCB;) with typed parameters; the second is declared by the interface.
Returned by
IPCB_Board.FindLinkedBoardTemplate, IPCB_PadViaLibrary.AddExternalTemplate, IPCB_PadViaLibrary.FindTemplate, IPCB_PadViaLibrary.FindTemplate_1, IPCB_PadViaLibrary.Template, IPCB_PadViaLibraryDocument.CurrentTemplate, IPCB_PadViaLibraryManager.CreateTemplate
Accepted by
IPCB_Board.LinkToTemplate, IPCB_PadViaLibrary.AddExternalTemplate, IPCB_PadViaLibrary.AddTemplate_1, IPCB_PadViaLibrary.CheckDublicate, IPCB_PadViaLibrary.RemoveTemplate, IPCB_PadViaLibraryManager.ExchangeTemplatesOnPrimitives, IPCB_PadViaLibraryManager.GetLibraryName_1, IPCB_PadViaLibraryManager.GetTemplateNameWithDynamicName, IPCB_PadViaLibraryManager.PlaceTemplate