
# IPCB_ObjectClassBase interface

An object class on a PCB document, a named group of objects of one kind, given by [`MemberKind`](#memberkind).

```csharp
public interface IPCB_ObjectClassBase : IPCB_Primitive
```

**Namespace:** PCB · **Assembly:** Altium.SDK.Interfaces

**Inherits:** [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md)

**Derived:** [IPCB_ObjectClass1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_ObjectClass1.md)

## Remarks

A class whose [`MemberKind`](#memberkind) is `TClassMemberKind.eClassMemberKind_ObjectClass` or `TClassMemberKind.eClassMemberKind_xNetClass` groups other object classes. [`IPCB_ObjectClass1`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_ObjectClass1.md) extends this interface with members by name and layer members.

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [DisplayName](#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`](#superclass) is true. |
| [MemberKind](#memberkind) | [TClassMemberKind](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TClassMemberKind.md) | get; set | The kind of objects the class contains; it determines which objects [`IsValidObjectKind`](#isvalidobjectkind) accepts. |
| [MembersCount](#memberscount) | `int` | get | The number of members of the class. |
| [Name](#name) | `string` | get; set | The name of the class. |
| [SuperClass](#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`](#superclass) is true.

```csharp
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`](#isvalidobjectkind) accepts.

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

**Type:** [TClassMemberKind](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TClassMemberKind.md) · **Access:** read/write

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

### MembersCount

The number of members of the class.

```csharp
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.

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

**Type:** `string` · **Access:** read/write

`Identifier` returns the same value.

### SuperClass

*No description yet.*

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

**Type:** `bool` · **Access:** read/write

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [AddMember](#addmember) | `void` | Adds an object to the class. |
| [IsMember](#ismember) | `bool` | Returns whether the object is a member of the class. |
| [IsValidObjectKind](#isvalidobjectkind) | `bool` | Returns whether the object is of a kind the class can contain, given its [`MemberKind`](#memberkind). |
| [RemoveAllMembers](#removeallmembers) | `void` | Removes all members from the class. |
| [RemoveMember](#removemember) | `void` | Removes an object from the class. |

### AddMember

Adds an object to the class.

```csharp
void AddMember(IPCB_Primitive argP);
void AddMember(object argP);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argP` | [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md) | 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`](#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.

```csharp
bool IsMember(IPCB_Primitive argP);
bool IsMember(object argP);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argP` | [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md) | 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`](#memberkind).

```csharp
bool IsValidObjectKind(IPCB_Primitive argP);
bool IsValidObjectKind(object argP);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argP` | [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md) | 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`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_PinPair.md)); a design channel class accepts component classes. A class whose [`MemberKind`](#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.

```csharp
void RemoveAllMembers();
```

**Returns:** nothing (`void`)

### RemoveMember

Removes an object from the class.

```csharp
void RemoveMember(IPCB_Primitive argP);
void RemoveMember(object argP);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argP` | [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md) | 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`](#isvalidobjectkind) returns false for it.

## Inherited members

- From [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md): [AllowGlobalEdit](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#allowglobaledit), [BeginModify](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#beginmodify), [Board](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#board), [BoundingRectangle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#boundingrectangle), [BoundingRectangleChildren](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#boundingrectanglechildren), [BoundingRectangleForPainting](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#boundingrectangleforpainting), [BoundingRectangleForSelection](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#boundingrectangleforselection), [CancelModify](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#cancelmodify), [Component](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#component), [Coordinate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#coordinate), [DescriptorString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#descriptorstring), [DetailString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#detailstring), [Dimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#dimension), [DrawAsPreview](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#drawaspreview), [DRCError](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#drcerror), [Enabled](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled), [Enabled_Direct](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_direct), [Enabled_vComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_vcomponent), [Enabled_vCoordinate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_vcoordinate), [Enabled_vDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_vdimension), [Enabled_vNet](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_vnet), [Enabled_vPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_vpolygon), [EnableDraw](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabledraw), [EndModify](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#endmodify), [Export_ToParameters](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#export_toparameters), [FlipXY](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#flipxy), [GraphicallyInvalidate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#graphicallyinvalidate), [Handle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#handle), [Identifier](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#identifier), [InBoard](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#inboard), [InComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#incomponent), [InCoordinate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#incoordinate), [Index](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#index), [InDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#indimension), [InNet](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#innet), [InPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#inpolygon), [InSelectionMemory](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#inselectionmemory), [IsAssyTestPoint_Bottom](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#isassytestpoint_bottom), [IsAssyTestPoint_Top](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#isassytestpoint_top), [IsElectricalPrim](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#iselectricalprim), [IsFreePrimitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#isfreeprimitive), [IsHidden](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#ishidden), [IsKeepout](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#iskeepout), [IsPreRoute](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#ispreroute), [IsSaveable](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#issaveable), [IsTenting](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#istenting), [IsTenting_Bottom](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#istenting_bottom), [IsTenting_Top](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#istenting_top), [IsTestPoint_Bottom](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#istestpoint_bottom), [IsTestPoint_Top](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#istestpoint_top), [Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#layer), [MiscFlag1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#miscflag1), [MiscFlag2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#miscflag2), [MiscFlag3](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#miscflag3), [Moveable](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#moveable), [MoveByXY](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#movebyxy), [MoveToXY](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#movetoxy), [Net](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#net), [ObjectID](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#objectid), [ObjectIDString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#objectidstring), [PadCacheRobotFlag](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#padcacherobotflag), [PasteMaskExpansion](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#pastemaskexpansion), [Polygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#polygon), [PolygonOutline](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#polygonoutline), [PowerPlaneClearance](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#powerplaneclearance), [PowerPlaneConnectStyle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#powerplaneconnectstyle), [PowerPlaneReliefExpansion](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#powerplanereliefexpansion), [Preview](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#preview), [ReliefAirGap](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#reliefairgap), [ReliefConductorWidth](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#reliefconductorwidth), [ReliefEntries](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#reliefentries), [Replicate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#replicate), [RequiredParamterSpace](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#requiredparamterspace), [RotateBy](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#rotateby), [Selected](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#selected), [SolderMaskExpansion](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#soldermaskexpansion), [SwapLayerPairs](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#swaplayerpairs), [TearDrop](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#teardrop), [UnionIndex](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#unionindex), [UniqueId](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#uniqueid), [UniqueID](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#uniqueid-1), [Used](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#used), [UserRouted](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#userrouted), [V7Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#v7layer), [ViewableObjectID](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#viewableobjectid)
