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.
public interface IModelType
Namespace: SCH · Assembly: Altium.SDK.Interfaces
Remarks
The IModelDataFiletype interface uses the IModelType interface
The IModelTypeManager interface uses the IModelType interface
Example
Show the properties of the model type of a component model in a library.
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 | string | The method returns the description of the model type. |
| Editor | IModelEditor | This method returns the IModelEditor for this model type. |
| Highlightable | bool | This method returns a boolean value for the model that can be highlightable (viewable on a document kind). |
| Name | string | The method returns the name of the model type supported by Altium Designer. |
| PortDescriptor | string | The PortDescriptor |
| Previewable | bool | This method returns a boolean value for the model that can be previewable. |
| ServerName | string | This method returns the Server Name associated with the model type. |
| 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.
string Description();
Returns: string
Editor
This method returns the IModelEditor for this model type.
IModelEditor Editor();
Returns: IModelEditor
Extension method of IModelTypeHelper (using SCH;).
See also: IModelEditor, IModelType.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.
bool Highlightable();
Returns: bool
See also: IModelType.ViewableDocKind, IModelType.Previewable
Name
The method returns the name of the model type supported by Altium Designer. The following model names supported by Altium Designer are:
string Name();
Returns: string
PortDescriptor
The PortDescriptor
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.
bool Previewable();
Returns: bool
See also: IModelType.Highlightable, IModelType.ViewableDocKind
ServerName
This method returns the Server Name associated with the model type.
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.
string ViewableDocKind();
Returns: string
See also: IModelType.Highlightable, IModelType.Previewable
Returned by
IIntegratedLibraryManager.GetModelType, IModelDatafileType.ModelType, IModelTypeManager.ModelTypeAt, IModelTypeManager.ModelTypeFromName, IModelTypeManager.ModelTypeFromServerName