IntLib API Datafile Interfaces

Now reading version 16.0. For the latest, read: IntLib API Datafile Interfaces for version 22

Parent page: Technical Reference - Integrated Library API

Please note that this documentation was last updated for an older version of Altium Designer. While many of the principles and approaches will remain the same, be aware that interfaces, objects, methods, properties, and the like will have changed since then, and will not reflect the entirety of those found in later versions of the software.

Integrated Library API: Datafile Interfaces

The Integrated Library API Datafile Interfaces Reference includes the following sections and content:

IModelDataFile Interface IModelDatafileType Interface
IModelDataFile Methods
IModelDataFile Properties
IModelDatafileType Methods

 

IModelDataFile Interface

Overview
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).

This interface is used within the IServerModel interface.

IModelDataFile Methods and Properties Table

IModelDatafile methods
FullPath
EntityCount
EntityName
AddEntity
IModelDatafile properties
EntityNames

See also
IModelDatafileType interface
Examples\Scripts\DelphiScript Scripts\DXP_Scripts\ folder of Altium Designer installation

IModelDataFile Methods

EntityName method

(IModelDatafile interface)
Syntax
Function EntityName (AnIndex : Integer) : WideString;
Description
The function returns the indexed entityname for the datafile related to the model.
See also
IModelDatafile interface
EntityCount method

EntityCount method

(IModelDatafile interface)
Syntax
Function EntityCount : Integer;
Description
This function returns the number of entities for the data file related to the model.
See also
IModelDatafile interface
EntityName method

AddEntity method

(IModelDatafile interface)
Syntax
Procedure AddEntity (AName : WideString);
Description
This procedure adds a new entity for the datafile.
See also
IModelDatafile interface

FullPath method

(IModelDatafile interface)
Syntax
Function FullPath : WideString;
Description
This procedure fetches the full path of the data file part of the model.
See also
IModelDatafile interface

IModelDataFile Properties

EntityNames Property

(IModelDatafile interface)
Syntax
Property EntityNames[AnIndex : Integer] : WideString Read EntityName;
Description
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 interface
EntityNames method.

 

IModelDatafileType Interface

Overview
The IModelDatafileType interface represents the data file type for the specified model. Simulation Model has three model types and thus three data files, PCB LIB has one model type and one data file, PCB3DLib has one model type and one data file and SI has one model type and one data file.

The IModelDatafileType interface is used by the IModelTypeManager

IModelDatafileType Methods and Properties Table

IModelDatafileType methods
FileKind
ExtensionFilter
Description
EntityType
ModelType
SupportsParameters
IModelDatafileType properties

See also
ReportIntLibData script from the Examples\Scripts\Delphiscript Scripts\DXP_Scripts\ folder of Altium Designer installation

IModelDatafileType Methods

Description method

(IModelDatafileType interface)
Syntax
Function Description : PChar;
Description
This function returns the description string for this IModelDatafiletype interface depending on the model’s data file type. Since Altium Designer supports four models and six model types:

Model Type (FileKind) ExtensionFilter DatafileType Description Entity Type Supports Parameters
MDL *.MDL Sim Model File Sim Model False
CKT *.CKT Sim Subcircuit File Sim Subcircuit False
LB *.LB SIMetrix Model Library File SIMetrix Model False
SIPinModelLibrary   SI Pin Model Library SI Pin Model False
PCBLIB *.PCBLIB Protel Footprint Library Footprint True
PCB3DLIB *.PCB3DLib PCB3D Model Library PCB3D Model False

Example

For I := 0 To ModelTypeMan.ModelDatafileTypeCount - 1 do
Begin
    ModelDatafileType := ModelTypeMan.ModelDatafileTypeAt(I);
    ShowMessage(
        ModelDatafileType.FileKind + #13 +
        ModelDatafileType.ExtensionFilter  + #13 +
        ModelDatafileType.Description + #13 +
        ModelDatafileType.EntityType  + #13 +
        ModelDatafileType.ModelType.Name  + #13 +
        BooleanToStr(ModelDatafileType.SupportsParameters));
End;

See also
IModelTypeManager interface
IModelDatafileType interface

EntityType method

(IModelDatafileType interface)
Syntax
Function EntityType : PChar;
Description
This function returns the Entity type string for this IModelDatafiletype interface depending on the model’s data file type. Since Altium Designer supports four models and six model types:

Model Type (FileKind) ExtensionFilter DatafileType Description Entity Type Supports Parameters
MDL *.MDL Sim Model File Sim Model False
CKT *.CKT Sim Subcircuit File Sim Subcircuit False
LB *.LB SIMetrix Model Library File SIMetrix Model False
SIPinModelLibrary   SI Pin Model Library SI Pin Model False
PCBLIB *.PCBLIB Protel Footprint Library Footprint True
PCB3DLIB *.PCB3DLib PCB3D Model Library PCB3D Model False

Example

For I := 0 To ModelTypeMan.ModelDatafileTypeCount - 1 do
Begin
    ModelDatafileType := ModelTypeMan.ModelDatafileTypeAt(I);
    ShowMessage(
        ModelDatafileType.FileKind + #13 +
        ModelDatafileType.ExtensionFilter  + #13 +
        ModelDatafileType.Description + #13 +
        ModelDatafileType.EntityType  + #13 +
        ModelDatafileType.ModelType.Name  + #13 +
        BooleanToStr(ModelDatafileType.SupportsParameters));
End;

See also
IModelTypeManager interface
IModelDatafileType interface

ExtensionFilter method

(IModelDatafileType interface)
Syntax
Function ExtensionFilter : PChar;
Description
This function returns the extension filter string for this IModelDatafiletype interface depending on the model’s data file type. Since Altium Designer supports four models and six model types:

Model Type (FileKind) ExtensionFilter DatafileType Description Entity Type Supports Parameters
MDL *.MDL Sim Model File Sim Model False
CKT *.CKT Sim Subcircuit File Sim Subcircuit False
LB *.LB SIMetrix Model Library File SIMetrix Model False
SIPinModelLibrary   SI Pin Model Library SI Pin Model False
PCBLIB *.PCBLIB Protel Footprint Library Footprint True
PCB3DLIB *.PCB3DLib PCB3D Model Library PCB3D Model False

Example

For I := 0 To ModelTypeMan.ModelDatafileTypeCount - 1 do
Begin
    ModelDatafileType := ModelTypeMan.ModelDatafileTypeAt(I);
    ShowMessage(
        ModelDatafileType.FileKind + #13 +
        ModelDatafileType.ExtensionFilter  + #13 +
        ModelDatafileType.Description + #13 +
        ModelDatafileType.EntityType  + #13 +
        ModelDatafileType.ModelType.Name  + #13 +
        BooleanToStr(ModelDatafileType.SupportsParameters));
End;

See also
IModelTypeManager interface
IModelDatafileType interface

FileKind method

(IModelDatafileType interface)
Syntax
Function FileKind : PChar;
Description
This function returns the FileKind string for this IModelDatafiletype interface depending on the model’s data file type. Since Altium Designer supports four models and six model types:

Model Type (FileKind) ExtensionFilter DatafileType Description Entity Type Supports Parameters
MDL *.MDL Sim Model File Sim Model False
CKT *.CKT Sim Subcircuit File Sim Subcircuit False
LB *.LB SIMetrix Model Library File SIMetrix Model False
SIPinModelLibrary   SI Pin Model Library SI Pin Model False
PCBLIB *.PCBLIB Protel Footprint Library Footprint True
PCB3DLIB *.PCB3DLib PCB3D Model Library PCB3D Model False

Example

For I := 0 To ModelTypeMan.ModelDatafileTypeCount - 1 do
Begin
    ModelDatafileType := ModelTypeMan.ModelDatafileTypeAt(I);
    ShowMessage(
        ModelDatafileType.FileKind + #13 +
        ModelDatafileType.ExtensionFilter  + #13 +
        ModelDatafileType.Description + #13 +
        ModelDatafileType.EntityType  + #13 +
        ModelDatafileType.ModelType.Name  + #13 +
        BooleanToStr(ModelDatafileType.SupportsParameters));
End;

See also
IModelTypeManager interface
IModelDatafileType interface

ModelType method

(IModelDatafileType interface)
Syntax
Function ModelType : IModelType;
Description
This function returns the ModelType string for this IModelDatafiletype interface depending on the model’s data file type. Since Altium Designer supports four models and six model types:

Model Type (FileKind) ExtensionFilter DatafileType Description Entity Type Supports Parameters
MDL *.MDL Sim Model File Sim Model False
CKT *.CKT Sim Subcircuit File Sim Subcircuit False
LB *.LB SIMetrix Model Library File SIMetrix Model False
SIPinModelLibrary   SI Pin Model Library SI Pin Model False
PCBLIB *.PCBLIB Protel Footprint Library Footprint True
PCB3DLIB *.PCB3DLib PCB3D Model Library PCB3D Model False

Example

For I := 0 To ModelTypeMan.ModelDatafileTypeCount - 1 do
Begin
    ModelDatafileType := ModelTypeMan.ModelDatafileTypeAt(I);
    ShowMessage(
        ModelDatafileType.FileKind + #13 +
        ModelDatafileType.ExtensionFilter  + #13 +
        ModelDatafileType.Description + #13 +
        ModelDatafileType.EntityType  + #13 +
        ModelDatafileType.ModelType.Name  + #13 +
        BooleanToStr(ModelDatafileType.SupportsParameters));
End;

See also
IModelTypeManager interface
IModelDatafileType interface

SupportsParameters method

(IModelDatafileType interface)
Syntax
Function SupportsParameters : Boolean;
Description
This function returns the SupportsParameters Boolean value for this IModelDatafiletype interface depending on the model’s data file type. Since Altium Designer supports four models and six model types:

Model Type (FileKind) ExtensionFilter DatafileType Description Entity Type Supports Parameters
MDL *.MDL Sim Model File Sim Model False
CKT *.CKT Sim Subcircuit File Sim Subcircuit False
LB *.LB SIMetrix Model Library File SIMetrix Model False
SIPinModelLibrary   SI Pin Model Library SI Pin Model False
PCBLIB *.PCBLIB Protel Footprint Library Footprint True
PCB3DLIB *.PCB3DLib PCB3D Model Library PCB3D Model False

Example

For I := 0 To ModelTypeMan.ModelDatafileTypeCount - 1 do
Begin
    ModelDatafileType := ModelTypeMan.ModelDatafileTypeAt(I);
    ShowMessage(
        ModelDatafileType.FileKind + #13 +
        ModelDatafileType.ExtensionFilter  + #13 +
        ModelDatafileType.Description + #13 +
        ModelDatafileType.EntityType  + #13 +
        ModelDatafileType.ModelType.Name  + #13 +
        BooleanToStr(ModelDatafileType.SupportsParameters));
End;

See also
IModelTypeManager interface
IModelDatafileType interface

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
Note

The features available depend on your Altium product access level. Compare features included in the various levels of Altium Designer Software Subscription and functionality delivered through applications provided by the Altium 365 platform.

If you don’t see a discussed feature in your software, contact Altium Sales to find out more.