
# IModelType interface

The `IModelType` interface represents the type used by a model linked in the Component. Each model has at least one data file type or entity type.

```csharp
public interface IModelType
```

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

## Remarks

The IModelDataFiletype interface uses the `IModelType` interface

The [`IModelTypeManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelTypeManager.md) interface uses the `IModelType` interface

## Example

Show the properties of the model type of a component model in a library.

```csharp
using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
    return;
// Placeholder and sample values: the library, the component and its model.
string libPath = "<library path>";
int aComponentIndex = 0;
int aModelIndex = 0;

IModelType aModelType = intMan.GetModelType(libPath, aComponentIndex, aModelIndex);
DXP.Utils.ShowMessage(aModelType.Name());
DXP.Utils.ShowMessage(aModelType.Description());
DXP.Utils.ShowMessage(aModelType.ServerName());
DXP.Utils.ShowMessage(aModelType.PortDescriptor());
DXP.Utils.ShowMessage(aModelType.ViewableDocKind());
DXP.Utils.ShowMessage(aModelType.Previewable().ToString());
DXP.Utils.ShowMessage(aModelType.Highlightable().ToString());
```

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [Description](#description) | `string` | The method returns the description of the model type. |
| [Editor](#editor) | [IModelEditor](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelEditor.md) | This method returns the [`IModelEditor`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelEditor.md) for this model type. |
| [Highlightable](#highlightable) | `bool` | This method returns a boolean value for the model that can be highlightable (viewable on a document kind). |
| [Name](#name) | `string` | The method returns the name of the model type supported by Altium Designer. |
| [PortDescriptor](#portdescriptor) | `string` | The `PortDescriptor` |
| [Previewable](#previewable) | `bool` | This method returns a boolean value for the model that can be previewable. |
| [ServerName](#servername) | `string` | This method returns the Server Name associated with the model type. |
| [ViewableDocKind](#viewabledockind) | `string` | This method returns the name of the Document Kind that's viewable (related to the Highlightable method). |

### Description

The method returns the description of the model type.

```csharp
string Description();
```

**Returns:** `string`

### Editor

This method returns the [`IModelEditor`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelEditor.md) for this model type.

```csharp
IModelEditor Editor();
```

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

Extension method of `IModelTypeHelper` (`using SCH;`).

**See also:** [IModelEditor](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelEditor.md), [IModelType.Description](#description)

### Highlightable

This method returns a boolean value for the model that can be highlightable (viewable on a document kind). Simulation and Signal Integrity models are not highlightable or previewable and thus they don't have viewable document kinds.

```csharp
bool Highlightable();
```

**Returns:** `bool`

**See also:** [IModelType.ViewableDocKind](#viewabledockind), [IModelType.Previewable](#previewable)

### Name

The method returns the name of the model type supported by Altium Designer. The following model names supported by Altium Designer are:

```csharp
string Name();
```

**Returns:** `string`

### PortDescriptor

The `PortDescriptor`

```csharp
string PortDescriptor();
```

**Returns:** `string`

### Previewable

This method returns a boolean value for the model that can be previewable. Simulation and Signal Integrity models are not highlightable or previewable and thus they don't have viewable document kinds.

```csharp
bool Previewable();
```

**Returns:** `bool`

**See also:** [IModelType.Highlightable](#highlightable), [IModelType.ViewableDocKind](#viewabledockind)

### ServerName

This method returns the Server Name associated with the model type.

```csharp
string ServerName();
```

**Returns:** `string`

### ViewableDocKind

This method returns the name of the Document Kind that's viewable (related to the Highlightable method). Simulation and Signal Integrity models are not highlightable and thus they don't have document kinds.

```csharp
string ViewableDocKind();
```

**Returns:** `string`

**See also:** [IModelType.Highlightable](#highlightable), [IModelType.Previewable](#previewable)

## Returned by

[IIntegratedLibraryManager.GetModelType](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IIntegratedLibraryManager.md#getmodeltype), [IModelDatafileType.ModelType](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelDatafileType.md#modeltype), [IModelTypeManager.ModelTypeAt](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelTypeManager.md#modeltypeat), [IModelTypeManager.ModelTypeFromName](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelTypeManager.md#modeltypefromname), [IModelTypeManager.ModelTypeFromServerName](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IModelTypeManager.md#modeltypefromservername)
