Skip to main content
View as Markdown

IPCB_ObjectClass2 interface

A class on a PCB document, with members in addition to IPCB_ObjectClass for the display name, the number of members, the membership of a design object and the members of a class that holds other classes.

public interface IPCB_ObjectClass2 : IPCB_ObjectClass

Namespace: PCB · Assembly: Altium.SDK.Interfaces

Inherits: IPCB_Primitive → IPCB_ObjectClass

Remarks​

A class that holds other classes is one whose MemberKind is TClassMemberKind.eClassMemberKind_ObjectClass or TClassMemberKind.eClassMemberKind_xNetClass. Its members are listed by kind with MembersCountByKind and MemberName_1; for any other class those two members return 0 and an empty string.

Properties​

PropertyTypeAccessDescription
DisplayNamestringgetThe name of the class for display.
MemberName_1stringgetThe name of a member of a class that holds other classes, by the member's kind.
MembersCountintgetThe number of members of the class.
MembersCountByKindintgetThe number of member classes of one kind in a class that holds other classes.

DisplayName​

The name of the class for display.

string GetState_DisplayName();

Type: string · Access: read-only

The same as Name, or Name in angle brackets (< and >) for a class whose SuperClass is true. A class that holds other classes gets the angle brackets only when its MemberKind is TClassMemberKind.eClassMemberKind_xNetClass. The SDK examples report each xSignal class by its display name.

MemberName_1​

The name of a member of a class that holds other classes, by the member's kind.

string GetState_MemberName_1(TClassMemberKind argKind, int argI);

Type: string · Access: read-only · Index: argKind (TClassMemberKind): The MemberKind of the member classes to list., argI (int): The index of the member among the members of that kind, from 0 to MembersCountByKind - 1 for the same kind.

The accessors are extension methods of IPCB_ObjectClass2Helper (using PCB;).

Returns an empty string for a class that does not hold other classes, and when the index is outside the members of that kind.

MembersCount​

The number of members of the class.

int GetState_MembersCount();

Type: int · Access: read-only

For a class that holds other classes, the member classes of all kinds are counted. For any other class the value is the number of stored member names, which is also the number of indexes MemberName accepts.

MembersCountByKind​

The number of member classes of one kind in a class that holds other classes.

int GetState_MembersCountByKind(TClassMemberKind argKind);

Type: int · Access: read-only · Index: argKind (TClassMemberKind): The MemberKind of the member classes to count.

The accessors are extension methods of IPCB_ObjectClass2Helper (using PCB;).

Returns 0 for a class that does not hold other classes, and when the class has no members of that kind.

Methods​

MethodReturnsDescription
IsMember_1boolReturns whether a design object is a member of the class.

IsMember_1​

Returns whether a design object is a member of the class.

bool IsMember_1(IPCB_Primitive argP);
bool IsMember_1(object argP);
ParameterTypePassingDescription
argPIPCB_PrimitivevalueThe design object to test.

Returns: bool

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

For a class that holds objects other than classes, the result is the same as IsMember for the object's Identifier; automatically generated component classes, such as the classes of the components on the top or the bottom side, decide from the component itself. For a class that holds other classes, the object must be a class that IsValidObjectKind accepts and whose name is among the members of its kind; a class is never a member of itself.

Inherited members​