
# IProjectVariant interface

The IProjectVariation interface represents the project that contains component variations. Physically, there is only one PCB document with components that are specified. So for each output requirement, each document variant is generated, although there is only one PCB design document.

```csharp
public interface IProjectVariant : 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_AddComponentVariation](#dm_addcomponentvariation) | [IComponentVariation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponentVariation.md) |  |
| [DM_AddParameter](#dm_addparameter) | `void` |  |
| [DM_Description](#dm_description) | `string` | Returns the description of this variant. |
| [DM_FindComponentVariationByDesignator](#dm_findcomponentvariationbydesignator) | [IComponentVariation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponentVariation.md) |  |
| [DM_FindComponentVariationByUniqueId](#dm_findcomponentvariationbyuniqueid) | [IComponentVariation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponentVariation.md) |  |
| [DM_Name](#dm_name) | `string` | Returns the name of this variant. |
| [DM_OverwritePCBFootprint](#dm_overwritepcbfootprint) | `bool` |  |
| [DM_Project](#dm_project) | [IProject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProject.md) | Returns the [`IProject`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProject.md) interface this variant is associated with. |
| [DM_RemoveComponentVariation](#dm_removecomponentvariation) | `void` |  |
| [DM_SetDescription](#dm_setdescription) | `void` |  |
| [DM_SetName](#dm_setname) | `void` |  |
| [DM_UniqueId](#dm_uniqueid) | `string` |  |
| [DM_VariationCount](#dm_variationcount) | `int` | Returns the count of variants. |
| [DM_Variations](#dm_variations) | [IComponentVariation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponentVariation.md) | Returns the indexed component variation for this project. |

### DM_AddComponentVariation

*No description yet.*

```csharp
IComponentVariation DM_AddComponentVariation();
```

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

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

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

### DM_AddParameter

*No description yet.*

```csharp
void DM_AddParameter(string argName, string argValue);
```

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

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

### DM_Description

Returns the description of this variant.

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

**Returns:** `string`

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

### DM_FindComponentVariationByDesignator

*No description yet.*

```csharp
IComponentVariation DM_FindComponentVariationByDesignator(string argDesignator);
```

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

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

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

### DM_FindComponentVariationByUniqueId

*No description yet.*

```csharp
IComponentVariation DM_FindComponentVariationByUniqueId(string argUniqueId);
```

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

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

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

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

### DM_Name

Returns the name of this variant.

```csharp
string DM_Name();
```

**Returns:** `string`

### DM_OverwritePCBFootprint

*No description yet.*

```csharp
bool DM_OverwritePCBFootprint();
```

**Returns:** `bool`

### DM_Project

Returns the [`IProject`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProject.md) interface this variant is associated with.

```csharp
IProject DM_Project();
```

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

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

### DM_RemoveComponentVariation

*No description yet.*

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

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

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

### DM_SetDescription

*No description yet.*

```csharp
void DM_SetDescription(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#L53), [Extension_CreateVariantComponent](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_CreateVariantComponent/Source%20Code/Commands.cs#L46)

### DM_SetName

*No description yet.*

```csharp
void DM_SetName(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#L52), [Extension_CreateVariantComponent](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_CreateVariantComponent/Source%20Code/Commands.cs#L45)

### DM_UniqueId

*No description yet.*

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

**Returns:** `string`

### DM_VariationCount

Returns the count of variants. To be used in conjunction with the [`DM_Variations`](#dm_variations)(index) method.

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

**Returns:** `int`

### DM_Variations

Returns the indexed component variation for this project. To be used in conjunction with the [`DM_VariationCount`](#dm_variationcount) method.

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

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

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

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

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

[IComponentVariation.DM_ProjectVariant](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IComponentVariation.md#dm_projectvariant), [IProject.DM_AddProjectVariant](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProject.md#dm_addprojectvariant), [IProject.DM_CurrentProjectVariant](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProject.md#dm_currentprojectvariant), [IProject.DM_ProjectVariants](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProject.md#dm_projectvariants)

## Accepted by

[IProject.DM_SetCurrentProjectVariant](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IProject.md#dm_setcurrentprojectvariant), [IPCB_DocumentPainterView.SetVariant](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_DocumentPainterView.md#setvariant)

## Examples

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