
# IComponentVariation interface

The `IComponentVariation` interface represents the component variant on a PCB document. There is only one physical document, but each component on this document can be specified to be a variant and when the output is generated, a specific variant document is generated. This variant output is controlled by the Output Job files.

```csharp
public interface IComponentVariation : 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_AddParameterVariation](#dm_addparametervariation) | [IParameterVariation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IParameterVariation.md) |  |
| [DM_AlternateLibraryLink](#dm_alternatelibrarylink) | [IComponentLibraryLink](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponentLibraryLink.md) |  |
| [DM_AlternatePart](#dm_alternatepart) | `string` | Returns the alternate part string for this component variant. |
| [DM_CalculatedAlternatePart](#dm_calculatedalternatepart) | `string` |  |
| [DM_EditAlternateLibraryLink](#dm_editalternatelibrarylink) | `bool` |  |
| [DM_EditAlternateLibraryLink_1](#dm_editalternatelibrarylink_1) | `bool` |  |
| [DM_FindParameterVariation](#dm_findparametervariation) | [IParameterVariation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IParameterVariation.md) |  |
| [DM_PhysicalDesignator](#dm_physicaldesignator) | `string` | Returns the full physical designator string for this component variant. |
| [DM_ProjectVariant](#dm_projectvariant) | [IProjectVariant](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProjectVariant.md) | This method returns the [`IProjectVariant`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProjectVariant.md) interface which represents a container that stores the component variants for the project. |
| [DM_RemoveParameterVariation](#dm_removeparametervariation) | `void` |  |
| [DM_SetAlternatePart](#dm_setalternatepart) | `void` |  |
| [DM_SetPhysicalDesignator](#dm_setphysicaldesignator) | `void` |  |
| [DM_SetUniqueId](#dm_setuniqueid) | `void` |  |
| [DM_SetVariationKind](#dm_setvariationkind) | `void` |  |
| [DM_UniqueId](#dm_uniqueid) | `string` | Returns the unique ID for this component variant. |
| [DM_VariationCount](#dm_variationcount) | `int` | Returns the number of variations. |
| [DM_VariationKind](#dm_variationkind) | [TVariationKind](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/TVariationKind.md) | This method returns the variation kind for this component. |
| [DM_Variations](#dm_variations) | [IParameterVariation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IParameterVariation.md) | Returns the indexed parameter variation for this component variation. |

### DM_AddParameterVariation

*No description yet.*

```csharp
IParameterVariation DM_AddParameterVariation();
```

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

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

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

### DM_AlternateLibraryLink

*No description yet.*

```csharp
IComponentLibraryLink DM_AlternateLibraryLink();
```

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

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

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

### DM_AlternatePart

Returns the alternate part string for this component variant.

```csharp
string DM_AlternatePart();
```

**Returns:** `string`

### DM_CalculatedAlternatePart

*No description yet.*

```csharp
string DM_CalculatedAlternatePart(IComponent argComponent);
string DM_CalculatedAlternatePart(object argComponent);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argComponent` | [IComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponent.md) | value |

**Returns:** `string`

The first overload is an extension method of `IComponentVariationHelper` (`using EDP;`) with typed parameters; the second is declared by the interface.

### DM_EditAlternateLibraryLink

*No description yet.*

```csharp
bool DM_EditAlternateLibraryLink(object argSchComponent);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argSchComponent` | `object` | value |

**Returns:** `bool`

### DM_EditAlternateLibraryLink_1

*No description yet.*

```csharp
bool DM_EditAlternateLibraryLink_1(object argSchComponent, object argComponent);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argSchComponent` | `object` | value |
| `argComponent` | `object` | value |

**Returns:** `bool`

### DM_FindParameterVariation

*No description yet.*

```csharp
IParameterVariation DM_FindParameterVariation(string argName);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argName` | `string` | value |

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

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

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

### DM_PhysicalDesignator

Returns the full physical designator string for this component variant.

```csharp
string DM_PhysicalDesignator();
```

**Returns:** `string`

### DM_ProjectVariant

This method returns the [`IProjectVariant`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProjectVariant.md) interface which represents a container that stores the component variants for the project.

```csharp
IProjectVariant DM_ProjectVariant();
```

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

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

### DM_RemoveParameterVariation

*No description yet.*

```csharp
void DM_RemoveParameterVariation(int argIndex);
```

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

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

### DM_SetAlternatePart

*No description yet.*

```csharp
void DM_SetAlternatePart(string argValue);
```

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

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

### DM_SetPhysicalDesignator

*No description yet.*

```csharp
void DM_SetPhysicalDesignator(string argValue);
```

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

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

### DM_SetUniqueId

*No description yet.*

```csharp
void DM_SetUniqueId(string argValue);
```

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

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

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

### DM_SetVariationKind

*No description yet.*

```csharp
void DM_SetVariationKind(TVariationKind argValue);
void DM_SetVariationKind(int argValue);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argValue` | [TVariationKind](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/TVariationKind.md) | value |

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

The first overload is an extension method of `IComponentVariationHelper` (`using EDP;`) with typed parameters; the second is declared by the interface.

**Examples:** [Extension_AddVariant](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_AddVariant/Source%20Code/Commands.cs#L65), [Extension_CreateVariantComponent](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_CreateVariantComponent/Source%20Code/Commands.cs#L72)

### DM_UniqueId

Returns the unique ID for this component variant.

```csharp
string DM_UniqueId();
```

**Returns:** `string`

### DM_VariationCount

Returns the number of variations.

```csharp
int DM_VariationCount();
```

**Returns:** `int`

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

### DM_VariationKind

This method returns the variation kind for this component.

```csharp
TVariationKind DM_VariationKind();
```

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

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

**Examples:** [Extension_BOMManager](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_BOMManager/Source%20Code/ProjectBom.cs#L113), [Extension_BOMManager](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_BOMManager/Source%20Code/ProjectComponent.cs#L38)

### DM_Variations

Returns the indexed parameter variation for this component variation.

```csharp
IParameterVariation DM_Variations(int argIndex);
```

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

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

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

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

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

[IProjectVariant.DM_AddComponentVariation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProjectVariant.md#dm_addcomponentvariation), [IProjectVariant.DM_FindComponentVariationByDesignator](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProjectVariant.md#dm_findcomponentvariationbydesignator), [IProjectVariant.DM_FindComponentVariationByUniqueId](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProjectVariant.md#dm_findcomponentvariationbyuniqueid), [IProjectVariant.DM_Variations](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProjectVariant.md#dm_variations)

## Accepted by

[IParameterVariation.DM_CalculatedValue](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IParameterVariation.md#dm_calculatedvalue)

## Examples

Used in the SDK examples: [Extension_AddVariant](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_AddVariant/Source%20Code/Commands.cs#L61), [Extension_BOMManager](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_BOMManager/Source%20Code/ProjectBom.cs#L106), [Extension_BOMManager](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_BOMManager/Source%20Code/ProjectComponent.cs#L14), [Extension_CreateVariantComponent](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_CreateVariantComponent/Source%20Code/Commands.cs#L60).
