Skip to main content
View as Markdown

IPCB_ObjectClassBase interface

An object class on a PCB document, a named group of objects of one kind, given by MemberKind.

public interface IPCB_ObjectClassBase : IPCB_Primitive

Namespace: PCB · Assembly: Altium.SDK.Interfaces

Inherits: IPCB_Primitive

Derived: IPCB_ObjectClass1

Remarks​

A class whose MemberKind is TClassMemberKind.eClassMemberKind_ObjectClass or TClassMemberKind.eClassMemberKind_xNetClass groups other object classes. IPCB_ObjectClass1 extends this interface with members by name and layer members.

Properties​

PropertyTypeAccessDescription
DisplayNamestringget; setThe name of the class for display: the same as Name, or Name in angle brackets (<Name>) for a class whose SuperClass is true.
MemberKindTClassMemberKindget; setThe kind of objects the class contains; it determines which objects IsValidObjectKind accepts.
MembersCountintgetThe number of members of the class.
Namestringget; setThe name of the class.
SuperClassboolget; set

DisplayName​

The name of the class for display: the same as Name, or Name in angle brackets (<Name>) for a class whose SuperClass is true.

string GetState_DisplayName();
void SetState_DisplayName(string argValue);

Type: string · Access: read/write

MemberKind​

The kind of objects the class contains; it determines which objects IsValidObjectKind accepts.

TClassMemberKind GetState_MemberKind();
void SetState_MemberKind(TClassMemberKind argValue);

Type: TClassMemberKind · Access: read/write

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

MembersCount​

The number of members of the class.

int GetState_MembersCount();

Type: int · Access: read-only

For a class whose members are object classes, the members of all kinds are counted.

Name​

The name of the class.

string GetState_Name();
void SetState_Name(string argValue);

Type: string · Access: read/write

Identifier returns the same value.

SuperClass​

No description yet.

bool GetState_SuperClass();
void SetState_SuperClass(bool argValue);

Type: bool · Access: read/write

Methods​

MethodReturnsDescription
AddMembervoidAdds an object to the class.
IsMemberboolReturns whether the object is a member of the class.
IsValidObjectKindboolReturns whether the object is of a kind the class can contain, given its MemberKind.
RemoveAllMembersvoidRemoves all members from the class.
RemoveMembervoidRemoves an object from the class.

AddMember​

Adds an object to the class.

void AddMember(IPCB_Primitive argP);
void AddMember(object argP);
ParameterTypePassingDescription
argPIPCB_PrimitivevalueThe object to add.

Returns: nothing (void)

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

Does nothing when the object is null or IsValidObjectKind returns false for it. A class whose members are object classes cannot be added to itself.

IsMember​

Returns whether the object is a member of the class.

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

Returns: bool

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

For some component classes the result depends on the component itself, for example whether it is on the top side of the board, not on a list of members.

IsValidObjectKind​

Returns whether the object is of a kind the class can contain, given its MemberKind.

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

Returns: bool

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

A net class (TClassMemberKind.eClassMemberKind_Net or TClassMemberKind.eClassMemberKind_xNet) accepts nets; component, from-to, pad, differential pair and polygon classes accept objects of that kind; a signal class accepts pin pairs (IPCB_PinPair); a design channel class accepts component classes. A class whose MemberKind is TClassMemberKind.eClassMemberKind_ObjectClass or TClassMemberKind.eClassMemberKind_xNetClass accepts any object class. For TClassMemberKind.eClassMemberKind_Layer and TClassMemberKind.eClassMemberKind_SplitPlane the result is false for every object.

RemoveAllMembers​

Removes all members from the class.

void RemoveAllMembers();

Returns: nothing (void)

RemoveMember​

Removes an object from the class.

void RemoveMember(IPCB_Primitive argP);
void RemoveMember(object argP);
ParameterTypePassingDescription
argPIPCB_PrimitivevalueThe object to remove.

Returns: nothing (void)

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

Does nothing when the object is null or IsValidObjectKind returns false for it.

Inherited members​