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
| Property | Type | Access | Description |
|---|---|---|---|
| DisplayName | string | get | The name of the class for display. |
| MemberName_1 | string | get | The name of a member of a class that holds other classes, by the member's kind. |
| MembersCount | int | get | The number of members of the class. |
| MembersCountByKind | int | get | The 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
| Method | Returns | Description |
|---|---|---|
| IsMember_1 | bool | Returns 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);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argP | IPCB_Primitive | value | The 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
- From IPCB_ObjectClass: AddLayerMember, AddMember, AddMemberByName, IsLayerMember, IsMember, IsValidObjectKind, MemberKind, MemberName, Name, RemoveAllMembers, RemoveLayerMember, RemoveMember, SuperClass
- From IPCB_Primitive: AllowGlobalEdit, BeginModify, Board, BoundingRectangle, BoundingRectangleChildren, BoundingRectangleForPainting, BoundingRectangleForSelection, CancelModify, Component, Coordinate, DescriptorString, DetailString, Dimension, DrawAsPreview, DRCError, Enabled, Enabled_Direct, Enabled_vComponent, Enabled_vCoordinate, Enabled_vDimension, Enabled_vNet, Enabled_vPolygon, EnableDraw, EndModify, Export_ToParameters, FlipXY, GraphicallyInvalidate, Handle, Identifier, InBoard, InComponent, InCoordinate, Index, InDimension, InNet, InPolygon, InSelectionMemory, IsAssyTestPoint_Bottom, IsAssyTestPoint_Top, IsElectricalPrim, IsFreePrimitive, IsHidden, IsKeepout, IsPreRoute, IsSaveable, IsTenting, IsTenting_Bottom, IsTenting_Top, IsTestPoint_Bottom, IsTestPoint_Top, Layer, MiscFlag1, MiscFlag2, MiscFlag3, Moveable, MoveByXY, MoveToXY, Net, ObjectID, ObjectIDString, PadCacheRobotFlag, PasteMaskExpansion, Polygon, PolygonOutline, PowerPlaneClearance, PowerPlaneConnectStyle, PowerPlaneReliefExpansion, Preview, ReliefAirGap, ReliefConductorWidth, ReliefEntries, Replicate, RequiredParamterSpace, RotateBy, Selected, SolderMaskExpansion, SwapLayerPairs, TearDrop, UnionIndex, UniqueId, UniqueID, Used, UserRouted, V7Layer, ViewableObjectID