Skip to main content
View as Markdown

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​

PropertyTypeAccessDescription
ExternalLinkIPCB_PadViaTemplateLinkgetThe template's external link, which holds the library, template and revision identifiers of an external template.
Internalboolget; set
LibraryIDstringget; setThe identifier of the pad and via library that the template belongs to.
ObjectIDTObjectIdgetThe object type of the template, TObjectId.ePadObject for a pad template and TObjectId.eViaObject for a via template.
PrimLinkCountintgetThe number of pads or vias that are linked to the template.
RemoveUnusedboolget; set
RevisionIDstringget; setThe revision identifier of the template.
TemplateDescriptionstringget; setThe free-text description of the template.
TemplateIDstringget; setThe identifier of the template within its library.
TemplateNamestringget; setThe display name of the template.

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​

MethodReturnsDescription
CreateTemplateLinkIPCB_PadViaTemplateLinkCreates a new template link that holds the template's LibraryID, TemplateID and RevisionID.
GetFullTemplateIDstringReturns the template's full identifier, its LibraryID and TemplateID joined by @.
HasLocalChangesboolReturns whether a pad or via differs from the template.

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);
ParameterTypePassingDescription
argPrimitiveIPCB_PrimitivevalueThe 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