Skip to main content
View as Markdown

IPCB_PrimitiveCounter interface

Counts the objects of a PCB document; IPCB_Board.GetPrimitiveCounter returns it.

public interface IPCB_PrimitiveCounter

Namespace: PCB · Assembly: Altium.SDK.Interfaces

Methods​

MethodReturnsDescription
GetCountuintCounts the objects of a set of object types.
GetHoleCountuintReturns the number of holes of the given hole type on the board.
GetObjectCountuintReturns the number of objects of the given object type.
GetStringCountuintReturns the number of text strings on the board.

GetCount​

Counts the objects of a set of object types.

uint GetCount(TObjectSet argObjectSet);
uint GetCount(ITransportSet argObjectSet);
ParameterTypePassingDescription
argObjectSetTObjectSetvalueThe object types to count.

Returns: uint

The first overload is an extension method of IPCB_PrimitiveCounterHelper (using PCB;) with typed parameters; the second is declared by the interface.

See also: TObjectSet

GetHoleCount​

Returns the number of holes of the given hole type on the board.

uint GetHoleCount(TExtendedHoleType argHoleType);
uint GetHoleCount(int argHoleType);
ParameterTypePassingDescription
argHoleTypeTExtendedHoleTypevalueThe hole shape to count.

Returns: uint

The first overload is an extension method of IPCB_PrimitiveCounterHelper (using PCB;) with typed parameters; the second is declared by the interface.

GetObjectCount​

Returns the number of objects of the given object type.

uint GetObjectCount(TObjectId argObjectId);
uint GetObjectCount(int argObjectId);
ParameterTypePassing
argObjectIdTObjectIdvalue

Returns: uint

The first overload is an extension method of IPCB_PrimitiveCounterHelper (using PCB;) with typed parameters; the second is declared by the interface.

GetStringCount​

Returns the number of text strings on the board.

uint GetStringCount();

Returns: uint

Text objects (TObjectId.eTextObject) are counted, except the designator and comment of each component.

Returned by​

IPCB_Board.GetPrimitiveCounter