
# IComponentImplementation interface

The `IComponentImplementation` interface is associated with an [`IPart`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IPart.md)/[`IComponent`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) interface in terms of model linking. Note that the [`IComponent`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) interface is inherited from the [`IPart`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IPart.md) interface.

```csharp
public interface IComponentImplementation : IDMObject
```

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

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

## Remarks

A model represents all the information needed for a component in a given domain (a model can be a PCB footprint, Simulation file or a Signal Integrity model). A model is also called an implementation.

Each schematic component can contain links to different model implementations such as PCB, Signal Integrity and Simulation models. Only one model of a particular model type (PCB footprint, SIM, SI, EDIF Macro and VHDL) can be enabled as the currently linked model, at any one time.

A model can be represented by external data sources called data file links. For example, pins of a component can have links to different data files, as for signal integrity models. We will consider each model type in respect to the data file links.

For PCB footprints, the data file link and the model is the same since the external file is the PCB footprint library.

For simulation models, there can be no data file links because these models are defined using the Spice format.

However for signal integrity models, each pin can have different pieces of information represented by ibis data files. These signal integrity models can have multiple data files, that is, each pin of a component can have a separate IBIS file. A signal integrity model can however use the Altium Designer's central Signal Integrity database.

Thus depending on which model type, you can have a number of data file links. Each data file link describes the model name, the path to where the library is stored in and what sort of model it is.

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [DM_DatafileCount](#dm_datafilecount) | `int` | The method returns the number of data files for the model. |
| [DM_DatafileEntity](#dm_datafileentity) | `string` | The method returns the indexed data file entity (the name of the implementation model). |
| [DM_DatafileFullPath](#dm_datafilefullpath) | `string` | Returns the full path to the data file, if the entity name and the file kind are valid. |
| [DM_DatafileKind](#dm_datafilekind) | `string` | The method returns the indexed data file kind (the model kind eg PCB etc)Used in conjunction with the DM_DataFileCount method. |
| [DM_DatafileLibIdentifierKind](#dm_datafilelibidentifierkind) | [TLibIdentifierKind](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/TLibIdentifierKind.md) |  |
| [DM_DatafileLibraryIdentifier](#dm_datafilelibraryidentifier) | `string` |  |
| [DM_DatafileLocation](#dm_datafilelocation) | `string` | The method returns the indexed data file location. |
| [DM_DatalinksLocked](#dm_datalinkslocked) | `bool` | The method denotes a boolean value whether datalinks are locked or not. |
| [DM_Description](#dm_description) | `string` | The method returns the description string of the implementation model. |
| [DM_IntegratedModel](#dm_integratedmodel) | `bool` | This method denotes a boolean value whether this is a model from an integrated library or not. |
| [DM_IsCurrent](#dm_iscurrent) | `bool` | The method denotes a boolean value whether this model implementation is current or not. |
| [DM_ModelName](#dm_modelname) | `string` | The method returns the model name of the implementation model. |
| [DM_ModelType](#dm_modeltype) | `string` | The method returns the model type as a string; |
| [DM_Part](#dm_part) | [IPart](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IPart.md) | The method denotes the mapping of pins of a component and its corresponding model. |
| [DM_PortMap](#dm_portmap) | `string` | The method denotes the mapping of pins of a component and its corresponding model. |
| [DM_PortMapList](#dm_portmaplist) | `string` | The method returns the mapping of pins of a component and its corresponding model. |
| [DM_SetDatafileCount](#dm_setdatafilecount) | `void` | The method sets the number of data files associated with the [`IPart`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IPart.md)/[`IComponent`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) interface. |
| [DM_SetDatafileEntity](#dm_setdatafileentity) | `void` | The method sets the data file entity which denotes the name of the implementation model linked to a schematic component/part. |
| [DM_SetDatafileKind](#dm_setdatafilekind) | `void` | The method sets the data file kind which denotes the type of implementation model. |
| [DM_SetDatafileLocation](#dm_setdatafilelocation) | `void` | The method sets the data file location which denotes the full path of the implementation model associated with the [`IPart`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IPart.md)/[`IComponent`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) interface. |
| [DM_SetUseComponentLibrary](#dm_setusecomponentlibrary) | `void` |  |
| [DM_UseComponentLibrary](#dm_usecomponentlibrary) | `bool` |  |

### DM_DatafileCount

The method returns the number of data files for the model. A data file is an internal aggregrate object and each data file describes the model name, the path to where the library is stored in and what implementation model type.

```csharp
int DM_DatafileCount();
```

**Returns:** `int`

**Examples:** [Extension_PartComment](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PartComment/Source%20Code/Commands.cs#L103)

### DM_DatafileEntity

The method returns the indexed data file entity (the name of the implementation model). Used in conjunction with the DM_DataFileCount method.

```csharp
string DM_DatafileEntity(int argIndex);
```

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

**Returns:** `string`

**Examples:** [Extension_PartComment](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PartComment/Source%20Code/Commands.cs#L116)

### DM_DatafileFullPath

Returns the full path to the data file, if the entity name and the file kind are valid. Used in conjunction with the DM_DataFileCount method.

```csharp
string DM_DatafileFullPath(int argIndex, string argEntityName, string argFileKind, ref string argFoundIn);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argIndex` | `int` | value |  |
| `argEntityName` | `string` | value | The entity name; must be valid. |
| `argFileKind` | `string` | value | The file kind; must be valid. |
| `argFoundIn` | `string` | ref | Returns the full path to the data file. |

**Returns:** `string`

### DM_DatafileKind

The method returns the indexed data file kind (the model kind eg PCB etc)Used in conjunction with the DM_DataFileCount method.

```csharp
string DM_DatafileKind(int argIndex);
```

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

**Returns:** `string`

**Examples:** [Extension_PartComment](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PartComment/Source%20Code/Commands.cs#L117)

### DM_DatafileLibIdentifierKind

*No description yet.*

```csharp
TLibIdentifierKind DM_DatafileLibIdentifierKind(int argIndex);
```

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

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

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

### DM_DatafileLibraryIdentifier

*No description yet.*

```csharp
string DM_DatafileLibraryIdentifier(int argIndex);
```

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

**Returns:** `string`

### DM_DatafileLocation

The method returns the indexed data file location. Used in conjunction with the DM_DataFileCount method.

```csharp
string DM_DatafileLocation(int argIndex);
```

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

**Returns:** `string`

**Examples:** [Extension_PartComment](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PartComment/Source%20Code/Commands.cs#L118)

### DM_DatalinksLocked

The method denotes a boolean value whether datalinks are locked or not. Note, a data file kind denotes the type of implementation model. Example, a PCB Footprint is a PCBLIB data file kind.

```csharp
bool DM_DatalinksLocked();
```

**Returns:** `bool`

### DM_Description

The method returns the description string of the implementation model.

```csharp
string DM_Description();
```

**Returns:** `string`

**Examples:** [Extension_PartComment](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PartComment/Source%20Code/Commands.cs#L83)

### DM_IntegratedModel

This method denotes a boolean value whether this is a model from an integrated library or not.

```csharp
bool DM_IntegratedModel();
```

**Returns:** `bool`

**Examples:** [Extension_PartComment](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PartComment/Source%20Code/Commands.cs#L106)

### DM_IsCurrent

The method denotes a boolean value whether this model implementation is current or not.

```csharp
bool DM_IsCurrent();
```

**Returns:** `bool`

### DM_ModelName

The method returns the model name of the implementation model.

```csharp
string DM_ModelName();
```

**Returns:** `string`

**Examples:** [Extension_PartComment](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PartComment/Source%20Code/Commands.cs#L82)

### DM_ModelType

The method returns the model type as a string;

```csharp
string DM_ModelType();
```

**Returns:** `string`

**Examples:** [Extension_PartComment](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PartComment/Source%20Code/Commands.cs#L84)

### DM_Part

The method denotes the mapping of pins of a component and its corresponding model.

```csharp
IPart DM_Part();
```

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

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

### DM_PortMap

The method denotes the mapping of pins of a component and its corresponding model.

```csharp
string DM_PortMap();
```

**Returns:** `string`

### DM_PortMapList

The method returns the mapping of pins of a component and its corresponding model.

```csharp
string DM_PortMapList();
```

**Returns:** `string`

### DM_SetDatafileCount

The method sets the number of data files associated with the [`IPart`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IPart.md)/[`IComponent`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) interface.

```csharp
void DM_SetDatafileCount(int argCount);
```

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

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

### DM_SetDatafileEntity

The method sets the data file entity which denotes the name of the implementation model linked to a schematic component/part.

```csharp
void DM_SetDatafileEntity(int argIndex, string argEntity);
```

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

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

### DM_SetDatafileKind

The method sets the data file kind which denotes the type of implementation model. Example, a PCB Footprint is a PCBLIB data file kind.

```csharp
void DM_SetDatafileKind(int argIndex, string argKind);
```

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

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

### DM_SetDatafileLocation

The method sets the data file location which denotes the full path of the implementation model associated with the [`IPart`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IPart.md)/[`IComponent`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) interface.

```csharp
void DM_SetDatafileLocation(int argIndex, string argLocation);
```

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

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

### DM_SetUseComponentLibrary

*No description yet.*

```csharp
void DM_SetUseComponentLibrary(bool argValue);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argValue` | `bool` | value |

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

### DM_UseComponentLibrary

*No description yet.*

```csharp
bool DM_UseComponentLibrary();
```

**Returns:** `bool`

## 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

[IPart.DM_CurrentImplementation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IPart.md#dm_currentimplementation), [IPart.DM_Implementations](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IPart.md#dm_implementations)

## Accepted by

[IModelEditor.CreateServerModel](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelEditor.md#createservermodel), [IModelEditor.PrepareModel](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelEditor.md#preparemodel)

## Examples

Used in the SDK examples: [Extension_PartComment](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PartComment/Source%20Code/Commands.cs#L81).
