
# IModelDatafile interface

The `IModelDatafile` interface represents the data file (external file) that is associated with a model. Each model can have multiple data files (different representations of the same model type).

```csharp
public interface IModelDatafile
```

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

## Remarks

This interface is used within the [`IServerModel`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IServerModel.md) interface.

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [AddEntity](#addentity) | `void` | This method adds a new entity for the datafile. |
| [EntityCount](#entitycount) | `int` | This method returns the number of entities for the data file related to the model. |
| [EntityName](#entityname) | `string` | The method returns the indexed entityname for the datafile related to the model. |
| [FullPath](#fullpath) | `string` | This method fetches the full path of the data file part of the model. |

### AddEntity

This method adds a new entity for the datafile.

```csharp
void AddEntity(string argName);
```

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

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

### EntityCount

This method returns the number of entities for the data file related to the model.

```csharp
int EntityCount();
```

**Returns:** `int`

**See also:** [IModelDatafile.EntityName](#entityname)

### EntityName

The method returns the indexed entityname for the datafile related to the model.

```csharp
string EntityName(int argnIndex);
```

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

**Returns:** `string`

This Entitynames property returns the indexed entity name for the datafile related to the model. This property is supported by the Entitynames method.

**See also:** [IModelDatafile.EntityCount](#entitycount)

### FullPath

This method fetches the full path of the data file part of the model.

```csharp
string FullPath();
```

**Returns:** `string`

## Returned by

[IModelEditor.CreateDatafile](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelEditor.md#createdatafile)
