IPCB_Component interface
A component on a PCB document, a footprint from a PCB library (or an integrated library) placed with a designator and an optional comment. A footprint can be linked to a schematic component.
public interface IPCB_Component : IPCB_Group
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Inherits: IPCB_Primitive → IPCB_Group
Remarks
Components are defined by footprints, which are stored in a PCB library. When a footprint is placed in the workspace, it is assigned a designator (and optional comment). It is then referred to as a component. A component is composed of primitives (normally tracks, arcs, and pads). The origin in the library editor defines the reference point of a footprint.
The reference point of a component is set by XLocation and YLocation, inherited from IPCB_Group. You can obtain the bounding rectangle of the component and calculate its mid point to rotate the component about its center if desired.
Rotation rotates the component about its reference point, therefore assigning Rotation and calling RotateAroundXY are equivalent only if the point you pass to RotateAroundXY is the reference point of the component.
A component is a group object and therefore composes of child objects such as arcs and tracks. You use a group iterator (GroupIterator_Create) to fetch the child objects for that component.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| Axis | IPCB_Axis | get | The axis of the component at the given index. |
| AxisCount | int | get | The number of axes of the component. |
| ChannelOffset | int | get; set | The ChannelOffset represents the Channel Offset parameter for the component. |
| Comment | IPCB_Text | get | The comment text object of the component. |
| CommentAutoPos | TTextAutoposition | get; set | The position of the comment text relative to the component. |
| CommentOn | bool | get; set | Whether the comment text of the component is visible. |
| ComponentKind | TComponentKind | get; set | The kind of the component, which decides how it takes part in synchronization, electrical checks and the BOM. |
| DefaultPCB3DModel | string | get; set | The name of the default PCB 3D model linked to this component. |
| EnablePartSwapping | bool | get; set | The property denotes the part swapping. |
| EnablePinSwapping | bool | get; set | The property denotes the pin swapping for the pins of this component. |
| FlippedOnLayer | bool | get; set | Not supported; reading always returns false, and assigning a value has no effect. |
| FootprintConfigurableParameters_Encoded | string | get; set | |
| FootprintConfiguratorName | string | get; set | |
| FootprintDescription | string | get; set | The description of the component's footprint. |
| FPGADisplayMode | TFPGADisplayMode | get; set | |
| GroupNum | int | get; set | This property is not used internally. |
| Height | int | get; set | The height of the component, in internal units (10,000 per mil). |
| IsBGA | bool | get | Whether the component has been recognized as a ball grid array (BGA) package. |
| ItemGUID | string | get; set | |
| ItemRevisionGUID | string | get; set | |
| JumpersVisible | bool | get; set | |
| LockStrings | bool | get; set | Whether the component's name and comment texts are locked, so that they cannot be moved independently of the component. |
| ModelHash | string | get | A hash of the 3D models in the component's bodies. |
| Name | IPCB_Text | get | The designator text object of the component. |
| NameAutoPos | TTextAutoposition | get; set | The position of the name (designator) text relative to the component. |
| NameOn | bool | get; set | Whether the name (designator) text of the component is visible. |
| PackageSpecificHash | string | get | A hash value computed from the component's primitives. |
| Pattern | string | get; set | The name of the component's footprint. |
| Rotation | double | get; set | The angle of the component with respect to the horizontal axis, in degrees. |
| SourceCompDesignItemID | string | get; set | The design item ID of the source component; SourceLibReference reads and assigns the same value. |
| SourceComponentLibrary | string | get; set | This source library field denotes the integrated library where the PCB component comes from. |
| SourceDescription | string | get; set | This property can include a descriptive account of the reference link to a source component or a device name. |
| SourceDesignator | string | get; set | This property represents the current designator of the source component from the corresponding schematic. |
| SourceFootprintLibrary | string | get; set | The library the component's footprint comes from. |
| SourceHierarchicalPath | string | get; set | This property uniquely identifies the source reference path to the PCB component. |
| SourceLibReference | string | get; set | The same value as SourceCompDesignItemID; reading and assigning this property reads and assigns SourceCompDesignItemID. |
| SourceUniqueId | string | get; set | Unique IDs (UIDs) are used to match each schematic component to the corresponding PCB component. |
| VaultGUID | string | get; set |
Axis
The axis of the component at the given index.
IPCB_Axis GetState_Axis(int argI);
Type: IPCB_Axis · Access: read-only · Index: argI (int): The zero-based index of the axis, less than AxisCount.
The accessors are extension methods of IPCB_ComponentHelper (using PCB;).
AxisCount
The number of axes of the component.
int GetState_AxisCount();
Type: int · Access: read-only
ChannelOffset
The ChannelOffset represents the Channel Offset parameter for the component. A channel offset denotes where the component is in a room especially when a room is being copied and a copy is created on the same document. The copies of rooms containing components are created based on their offsets.
int GetState_ChannelOffset();
void SetState_ChannelOffset(int argValue);
Type: int · Access: read/write
Comment
The comment text object of the component.
IPCB_Text GetState_Comment();
Type: IPCB_Text · Access: read-only
The accessors are extension methods of IPCB_ComponentHelper (using PCB;).
See also: IPCB_Text
Examples: Extension_BOMManager
CommentAutoPos
The position of the comment text relative to the component.
TTextAutoposition GetState_CommentAutoPos();
void SetState_CommentAutoPos(TTextAutoposition argValue);
Type: TTextAutoposition · Access: read/write
The accessors are extension methods of IPCB_ComponentHelper (using PCB;).
Assigning a value does not move the text; ChangeCommentAutoposition sets the position and moves the text.
See also: TTextAutoposition
CommentOn
Whether the comment text of the component is visible.
bool GetState_CommentOn();
void SetState_CommentOn(bool argValue);
Type: bool · Access: read/write
ComponentKind
The kind of the component, which decides how it takes part in synchronization, electrical checks and the BOM.
TComponentKind GetState_ComponentKind();
void SetState_ComponentKind(TComponentKind argValue);
Type: TComponentKind · Access: read/write
The accessors are extension methods of IPCB_ComponentHelper (using PCB;).
EDP.TComponentKind.eComponentKind_Standard: these components possess standard electrical properties, are always synchronized and are the type most commonly used on a board.
EDP.TComponentKind.eComponentKind_Mechanical: these components do not have electrical properties and will appear in the BOM. They are synchronized if the same components exist on both the schematic and PCB documents. An example is a heatsink.
EDP.TComponentKind.eComponentKind_Graphical: these components are not used during synchronization or checked for electrical errors. These components are used, for example, when adding company logos to documents.
EDP.TComponentKind.eComponentKind_NetTie_BOM: these components short two or more different nets for routing; they appear in the BOM and are maintained during synchronization.
EDP.TComponentKind.eComponentKind_NetTie_NoBOM: these components short two or more different nets for routing; they do not appear in the BOM and are maintained during synchronization.
Examples: Extension_BOMManager
DefaultPCB3DModel
The name of the default PCB 3D model linked to this component.
string GetState_DefaultPCB3DModel();
void SetState_DefaultPCB3DModel(string argValue);
Type: string · Access: read/write
EnablePartSwapping
The property denotes the part swapping. Components can have multi-parts and in this case, these multi parts can be swapped if the EnablePartSwapping is set to true.
bool GetState_EnablePartSwapping();
void SetState_EnablePartSwapping(bool argValue);
Type: bool · Access: read/write
EnablePinSwapping
The property denotes the pin swapping for the pins of this component. In this case, these pins can be swapped if the EnablePinSwapping is set to true.
bool GetState_EnablePinSwapping();
void SetState_EnablePinSwapping(bool argValue);
Type: bool · Access: read/write
FlippedOnLayer
Not supported; reading always returns false, and assigning a value has no effect.
bool GetState_FlippedOnLayer();
void SetState_FlippedOnLayer(bool argValue);
Type: bool · Access: read/write
FootprintConfigurableParameters_Encoded
No description yet.
string GetState_FootprintConfigurableParameters_Encoded();
void SetState_FootprintConfigurableParameters_Encoded(string argValue);
Type: string · Access: read/write
FootprintConfiguratorName
No description yet.
string GetState_FootprintConfiguratorName();
void SetState_FootprintConfiguratorName(string argValue);
Type: string · Access: read/write
Examples: Extension_BOMManager
FootprintDescription
The description of the component's footprint.
string GetState_FootprintDescription();
void SetState_FootprintDescription(string argValue);
Type: string · Access: read/write
Examples: Extension_BOMManager
FPGADisplayMode
No description yet.
TFPGADisplayMode GetState_FPGADisplayMode();
void SetState_FPGADisplayMode(TFPGADisplayMode argValue);
Type: TFPGADisplayMode · Access: read/write
The accessors are extension methods of IPCB_ComponentHelper (using PCB;).
GroupNum
This property is not used internally. Can use for specific purposes such as a tag or an index.
int GetState_GroupNum();
void SetState_GroupNum(int argValue);
Type: int · Access: read/write
Height
The height of the component, in internal units (10,000 per mil). It is used for the 3D viewer which works out the heights of components before displaying components in a 3D view.
int GetState_Height();
void SetState_Height(int argValue);
Type: int · Access: read/write
Examples: Extension_BOMManager
IsBGA
Whether the component has been recognized as a ball grid array (BGA) package.
bool GetState_IsBGA();
Type: bool · Access: read-only
ItemGUID
No description yet.
string GetState_ItemGUID();
void SetState_ItemGUID(string argValue);
Type: string · Access: read/write
ItemRevisionGUID
No description yet.
string GetState_ItemRevisionGUID();
void SetState_ItemRevisionGUID(string argValue);
Type: string · Access: read/write
JumpersVisible
No description yet.
bool GetState_JumpersVisible();
void SetState_JumpersVisible(bool argValue);
Type: bool · Access: read/write
LockStrings
Whether the component's name and comment texts are locked, so that they cannot be moved independently of the component.
bool GetState_LockStrings();
void SetState_LockStrings(bool argValue);
Type: bool · Access: read/write
ModelHash
A hash of the 3D models in the component's bodies.
string GetState_ModelHash();
Type: string · Access: read-only
The hash covers each model with its origin, rotations and vertical offset. It is an empty string when no component body of the component has a 3D model.
Name
The designator text object of the component.
IPCB_Text GetState_Name();
Type: IPCB_Text · Access: read-only
The accessors are extension methods of IPCB_ComponentHelper (using PCB;).
See also: IPCB_Text
NameAutoPos
The position of the name (designator) text relative to the component.
TTextAutoposition GetState_NameAutoPos();
void SetState_NameAutoPos(TTextAutoposition argValue);
Type: TTextAutoposition · Access: read/write
The accessors are extension methods of IPCB_ComponentHelper (using PCB;).
Assigning a value does not move the text; ChangeNameAutoposition sets the position and moves the text.
See also: TTextAutoposition
NameOn
Whether the name (designator) text of the component is visible.
bool GetState_NameOn();
void SetState_NameOn(bool argValue);
Type: bool · Access: read/write
PackageSpecificHash
A hash value computed from the component's primitives.
string GetState_PackageSpecificHash();
Type: string · Access: read-only
Pattern
The name of the component's footprint.
string GetState_Pattern();
void SetState_Pattern(string argValue);
Type: string · Access: read/write
Leading and trailing spaces are removed from an assigned value.
Rotation
The angle of the component with respect to the horizontal axis, in degrees.
double GetState_Rotation();
void SetState_Rotation(double argValue);
Type: double · Access: read/write
Assigning a different value rotates the component, with its primitives, about its reference point (XLocation, YLocation) by the difference.
SourceCompDesignItemID
The design item ID of the source component; SourceLibReference reads and assigns the same value.
string GetState_SourceCompDesignItemID();
void SetState_SourceCompDesignItemID(string argValue);
Type: string · Access: read/write
Examples: Extension_BOMManager
SourceComponentLibrary
This source library field denotes the integrated library where the PCB component comes from. Note: When a schematic is transferred to a blank PCB using the Update command, the source reference links for each PCB footprint is populated with source library path names.
string GetState_SourceComponentLibrary();
void SetState_SourceComponentLibrary(string argValue);
Type: string · Access: read/write
Examples: Extension_BOMManager