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
| Property | Type | Access | Description |
|---|---|---|---|
| DisplayName | string | get; set | The name of the class for display: the same as Name, or Name in angle brackets (<Name>) for a class whose SuperClass is true. |
| MemberKind | TClassMemberKind | get; set | The kind of objects the class contains; it determines which objects IsValidObjectKind accepts. |
| MembersCount | int | get | The number of members of the class. |
| Name | string | get; set | The name of the class. |
| SuperClass | bool | get; 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
| Method | Returns | Description |
|---|---|---|
| AddMember | void | Adds an object to the class. |
| IsMember | bool | Returns whether the object is a member of the class. |
| IsValidObjectKind | bool | Returns whether the object is of a kind the class can contain, given its MemberKind. |
| RemoveAllMembers | void | Removes all members from the class. |
| RemoveMember | void | Removes an object from the class. |
AddMember
Adds an object to the class.
void AddMember(IPCB_Primitive argP);
void AddMember(object argP);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argP | IPCB_Primitive | value | The 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);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argP | IPCB_Primitive | value | The 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);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argP | IPCB_Primitive | value | The 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);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argP | IPCB_Primitive | value | The 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
- 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