
# IComponentMappings interface

The `IComponentMappings` interface represents the mapping of source components and target components in schematic and PCB documents.

```csharp
public interface IComponentMappings : IDMObject
```

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

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

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [DM_MatchedComponentCount](#dm_matchedcomponentcount) | `int` | Returns the number of matched components. |
| [DM_MatchedSourceComponent](#dm_matchedsourcecomponent) | [IComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) | Returns the indexed matched source component (that has been matched with a target component). |
| [DM_MatchedTargetComponent](#dm_matchedtargetcomponent) | [IComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) | Returns the indexed matched source component (that has been matched with a target component). |
| [DM_UnmatchedSourceComponent](#dm_unmatchedsourcecomponent) | [IComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) | Returns the indexed unmatched source component, that is, a target component could not be found to map to this source component. |
| [DM_UnmatchedSourceComponentCount](#dm_unmatchedsourcecomponentcount) | `int` | Returns the number of unmatched source components. |
| [DM_UnmatchedTargetComponent](#dm_unmatchedtargetcomponent) | [IComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) | Returns the indexed unmatched target component, that is, a source component could not be found to map to the target component. |
| [DM_UnmatchedTargetComponentCount](#dm_unmatchedtargetcomponentcount) | `int` | Returns the number of unmatched target components. |

### DM_MatchedComponentCount

Returns the number of matched components.

```csharp
int DM_MatchedComponentCount();
```

**Returns:** `int`

### DM_MatchedSourceComponent

Returns the indexed matched source component (that has been matched with a target component). Use the DM_MatchedSourceComponentCount method.

```csharp
IComponent DM_MatchedSourceComponent(int argIndex);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argIndex` | `int` | value |

**Returns:** [IComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md)

Extension method of `IComponentMappingsHelper` (`using EDP;`).

### DM_MatchedTargetComponent

Returns the indexed matched source component (that has been matched with a target component). Use the DM_MatchedTargetComponentCount method.

```csharp
IComponent DM_MatchedTargetComponent(int argIndex);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argIndex` | `int` | value |

**Returns:** [IComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md)

Extension method of `IComponentMappingsHelper` (`using EDP;`).

### DM_UnmatchedSourceComponent

Returns the indexed unmatched source component, that is, a target component could not be found to map to this source component. Use the [`DM_UnmatchedSourceComponentCount`](#dm_unmatchedsourcecomponentcount) method.

```csharp
IComponent DM_UnmatchedSourceComponent(int argIndex);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argIndex` | `int` | value |

**Returns:** [IComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md)

Extension method of `IComponentMappingsHelper` (`using EDP;`).

### DM_UnmatchedSourceComponentCount

Returns the number of unmatched source components.

```csharp
int DM_UnmatchedSourceComponentCount();
```

**Returns:** `int`

### DM_UnmatchedTargetComponent

Returns the indexed unmatched target component, that is, a source component could not be found to map to the target component. Use the [`DM_UnmatchedTargetComponentCount`](#dm_unmatchedtargetcomponentcount) method.

```csharp
IComponent DM_UnmatchedTargetComponent(int argIndex);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argIndex` | `int` | value |

**Returns:** [IComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md)

Extension method of `IComponentMappingsHelper` (`using EDP;`).

### DM_UnmatchedTargetComponentCount

Returns the number of unmatched target components.

```csharp
int DM_UnmatchedTargetComponentCount();
```

**Returns:** `int`

## Inherited members

- From [IDMObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md): [DM_CalculateParameterValue](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_calculateparametervalue), [DM_CurrentSheetInstanceNumber](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_currentsheetinstancenumber), [DM_FullCrossProbeString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_fullcrossprobestring), [DM_GeneralField](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_generalfield), [DM_GetVCSProject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_getvcsproject), [DM_ImageIndex](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_imageindex), [DM_IsFormulaString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_isformulastring), [DM_IsInferredObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_isinferredobject), [DM_LocationString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_locationstring), [DM_LocationX](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_locationx), [DM_LocationY](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_locationy), [DM_LongDescriptorString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_longdescriptorstring), [DM_NetIndex_Flat](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_netindex_flat), [DM_NetIndex_Sheet](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_netindex_sheet), [DM_NetIndex_SubNet](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_netindex_subnet), [DM_ObjectKindString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_objectkindstring), [DM_ObjectKindStringForCrossProbe](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_objectkindstringforcrossprobe), [DM_OwnerDocument](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_ownerdocument), [DM_OwnerDocumentFullPath](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_ownerdocumentfullpath), [DM_OwnerDocumentName](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_ownerdocumentname), [DM_ParameterCount](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_parametercount), [DM_Parameters](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_parameters), [DM_PcbHandle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_pcbhandle), [DM_PCBObjectHandle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_pcbobjecthandle), [DM_PCBObjectInterface](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_pcbobjectinterface), [DM_PrimaryCrossProbeString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_primarycrossprobestring), [DM_SchHandle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_schhandle), [DM_SCHObjectHandle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_schobjecthandle), [DM_SCHObjectInterface](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_schobjectinterface), [DM_SecondaryCrossProbeString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_secondarycrossprobestring), [DM_SetVCSProject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_setvcsproject), [DM_SheetIndex_Logical](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_sheetindex_logical), [DM_SheetIndex_Physical](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_sheetindex_physical), [DM_ShortDescriptorString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_shortdescriptorstring), [DM_ValidForNavigation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_validfornavigation), [DM_VHDLEntity](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md#dm_vhdlentity)

## Returned by

[IProject.DM_ComponentMappings](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProject.md#dm_componentmappings), [IProject.DM_ComponentMappings_1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProject.md#dm_componentmappings_1)
