IntLib API IModel Interfaces

Old Content - visit altium.com/documentation

Parent page: Technical Reference - Integrated Library API

Integrated Library API: IModel Interfaces

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

IModelEditor Interface IModelType Interface IServerModel Interface IModelEditorSelectionListener Interface
IModelEditor Methods IModelType Methods IServerModel Methods
IServerModel Properties
 
       
IHighlightedModelEditor Interface Integrated Library Enumerated Types Integrated Library Constants Integrated Library Functions

IHighlightedModelEditor Methods

     

 

IModelEditor Interface

Overview
The IModelEditor interface represents the Model Editor hosted by a server which normally has a dialog that displays data about the model properties in Altium Designer. This IModelEditor interface is the front end for the actual implementation of a Model Editor for a specific model domain (PCB, Signal Integrity and other model types).

IModelEditor Methods and Properties Table

IModelEditor methods
EditModel
CreateDatafile
StartingLibraryCompile
FinishedLibraryCompile
PrepareModel
CreateServerModel
GetExternalForm
DrawModel
GetEntityParameters
SetDefaultModelState
CrossProbeEntity
DrawModelToMetaFile
IModelEditor properties

IModelEditor Methods

CreateDatafile method

(IModelEditor interface)
Syntax
Function CreateDatafile (ADatafilePath : PChar) : IModelDatafile;
Description
Example
See also
IModelEditor interface

CreateServerModel method

(IModelEditor interface)
Syntax
Function CreateServerModel (AModel : IComponentImplementation) : IServerModel;
Description
Example
See also
IModelEditor interface

CrossProbeEntity method

(IModelEditor interface)
Syntax
Procedure CrossProbeEntity (AEntityName : WideString;ADataFilePath : WideString);
Description
Example
See also
IModelEditor interface

DrawModel method

(IModelEditor interface)
Syntax
Procedure DrawModel (AExternalForm : IExternalForm;AModelName : PChar;ADataFilePath : PChar);
Description
Example
See also
IModelEditor interface

DrawModelToMetaFile method

(IModelEditor interface)
Syntax
Procedure DrawModelToMetaFile (Const AFileName : WideString;Const AModelName : WideString;Const ADataFilePath : WideString;APaintColorMode : TPaintColorMode;APaintScaleMode : TPaintScaleMode);
Description
Example
See also
IModelEditor interface

EditModel method

(IModelEditor interface)
Syntax
Function EditModel (SchModel : ISch_Implementation; SchComp : ISch_Component;IsLibrary : Boolean) : Boolean;
Description
Example
See also
IModelEditor interface

FinishedLibraryCompile method

(IModelEditor interface)
Syntax
Procedure FinishedLibraryCompile;
Description
Example
See also
IModelEditor interface

GetEntityParameters method

(IModelEditor interface)
Syntax
Function GetEntityParameters (AEntityName : WideString; ADataFilePath : WideString) : WideString;
Description
Example
See also
IModelEditor interface

GetExternalForm method

(IModelEditor interface)
Syntax
Function GetExternalForm : IExternalForm;
Description
Example
See also
IModelEditor interface

PrepareModel method

(IModelEditor interface)
Syntax
Function PrepareModel (AModel : IComponentImplementation) : Boolean;
Description
Example
See also
IModelEditor interface

StartingLibraryCompile method

(IModelEditor interface)
Syntax
Procedure StartingLibraryCompile;
Description
Example
See also
IModelEditor interface

SetDefaultModelState method

(IModelEditor interface)
Syntax
Function SetDefaultModelState (SchModel : ISch_Implementation;SchComp : ISch_Component;IsLibrary : Boolean) : Boolean;
Description
Example
See also
IModelEditor interface

 

IModelType Interface

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

The IModelDataFiletype interface uses the IModelType interface
The IModelTypeManager interface uses the IModelType interface

IModelType Methods and Properties Table

IModelType methods
Name
Description
ServerName
PortDescriptor
Editor
Previewable
Highlightable
IModelType properties

See Also
IModelDataFileType interface
IModelTypeManager interface
Examples\Scripts\DXP_Scripts\ folder of Altium Designer installation.

IModelType Methods

Description method

(IModelType interface)
Syntax
Function Description : PChar;
Description
The function returns the description of the model type.

Model Type Description Model Type Name ServerName
Simulation SIM Sim
Signal Integrity SI SignalIntegrity
Footprint PCBLIB PCB
PCB3D PCB3DLIB PCB3D

Example

 IntMan := IntegratedLibraryManager; If IntMan = Nil Then Exit;   AModelType := IntMan.GetModelType(Libpath, AComponentIndex, AModelIndex) ShowMessage(AModelType.Description);

See also
IModelType interface

Editor method

(IModelType interface)
Syntax
Function Editor : IModelEditor;
Description
This method returns the IModelEditor for this model type.
See also
IModelType interface
IModelEditor interface
IModelType.Description method

Name method

(IModelType interface)
Syntax
Function Name : PChar;
Description
The function returns the name of the model type supported by Altium Designer. The following model names supported by Altium Designer are:

Model Type Name Model Type Description ServerName
SIM Simulation Sim
SI Signal Integrity SignalIntegrity
PCBLIB Footprint PCB
PCB3DLIB PCB3D PCB3D

Example

 IntMan := IntegratedLibraryManager; If IntMan = Nil Then Exit;   AModelType := IntMan.GetModelType(Libpath, AComponentIndex, AModelIndex); ShowMessage(AModelType.Name);

See also
IModelType interface

PortDescriptor method

(IModelType interface)
Syntax
Function PortDescriptor : PChar;
Description
The PortDescriptor
Example

 IntMan := IntegratedLibraryManager; If IntMan = Nil Then Exit;   AModelType := IntMan.GetModelType(Libpath, AComponentIndex, AModelIndex); ShowMessage(AModelType.Descriptor);

See also
IModelType interface

Previewable method

(IModelType interface)
Syntax
Function Previewable : Boolean;
Description
This function 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.
Example

 IntMan := IntegratedLibraryManager; If IntMan = Nil Then Exit;   AModelType := IntMan.GetModelType(Libpath, AComponentIndex, AModelIndex); ShowMessage(BooleanToStr(AModelType.Previewable));

See also
IModelType interface
Highlightable method
ViewableDocKind method

ServerName method

(IModelType interface)
Syntax
Function ServerName : PChar;
Description
This function returns the Server Name associated with the model type.

ServerName Model Type Name Model Type Description
Sim SIM Simulation
SignalIntegrity SI Signal Integrity
PCB PCBLIB Footprint
PCB3D PCB3DLIB PCB3D

Example

 IntMan := IntegratedLibraryManager; If IntMan = Nil Then Exit;   AModelType := IntMan.GetModelType(Libpath, AComponentIndex, AModelIndex); ShowMessage(AModelType.ServerName);

See also
IModelType interface

Highlightable method

(IModelType interface)
Syntax
Function Highlightable : Boolean;
Description
This function 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.
Example

 IntMan := IntegratedLibraryManager; If IntMan = Nil Then Exit;   AModelType := IntMan.GetModelType(Libpath, AComponentIndex, AModelIndex); ShowMessage(BooleanToStr(AModelType.Highlightable));

See also
IModelType interface
ViewableDocKind method
Previewable method

ViewableDocKind method

(IModelType interface)
Syntax
Function ViewableDocKind : PChar
Description
This function 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.
Example

 IntMan := IntegratedLibraryManager; If IntMan = Nil Then Exit;   AModelType := IntMan.GetModelType(Libpath, AComponentIndex, AModelIndex); ShowMessage(AModelType.ViewableDocKind);

See also
IModelType interface
Highlightable method
Previewable method

 

IServerModel Interface

Overview
The IServerModel interface represents the model set up by the server to be used by the integrated library server.

IServerModel Methods and Properties Table

IServerModel methods
Name
PortCount
PortName
AddPort
CheckSchPins
CheckModelPins
IServerModel properties
PortNames

See also
IModelEditor interface

IServerModel Methods

AddPort method

(IServerModel interface)
Syntax
Procedure AddPort (AName : PChar);
Description
See also
IServerModel interface

Name method

(IServerModel interface)
Syntax
Function Name : PChar;
Description
The function gives the name for the Server Model.
See also
IServerModel interface

PortName method

(IServerModel interface)
Syntax
Function PortName (AnIndex : Integer) : PChar;
Description
Example
See also
IServerModel interface

PortCount method

(IServerModel interface)
Syntax
Function PortCount : Integer;
Description
This function returns the number of ports for this Server Model.
See also
IServerModel interface

CheckSchPins method

(IServerModel interface)
Syntax
Function CheckSchPins : Boolean
Description
Example
See also
IServerModel interface

CheckModelPins method

(IServerModel interface)
Syntax
Function CheckModelPins : Boolean;
Description
Example
See also
IServerModel interface

IServerModel Properties

PortNames property

(IServerModel interface)
Syntax
Property PortNames[AnIndex : Integer] : PChar Read PortName;
Description
Example
See also
IServerModel interface
 

IModelEditorSelectionListener Interface

Overview

IModelEditorSelectionListener methods
PinSelectionChanged
IModelEditorSelectionListener properties

See also
 

IHighlightedModelEditor Interface

Overview
IHighlightedModelEditor Methods and Properties Table

IHighlightedModelEditor methods
HighlightComponentPins
ShowSpecifiedPinsOnly
ShowPinsAsSelected
DrawModel_PinsSelected
RegisterListener
IHighlightedModelEditor properties

See also
IModelType interface

IHighlightedModelEditor Methods

HighlightComponentPins Method

(IHighlightedModelEditor interface)
Syntax
Procedure HighlightComponentPins(AExternalForm      : IExternalForm;
                                 APinNameList       : WideString;
                                 AHighlightColor    : TColor;
                                 ANonHighlightColor : TColor);
Description
Example
See also
IHighlightedModelEditor interface

ShowSpecifiedPinsOnly Method

(IHighlightedModelEditor interface)
Syntax
Procedure ShowSpecifiedPinsOnly (AExternalForm      : IExternalForm;
                                 APinNameList       : WideString);
Description
Example
See also
IHighlightedModelEditor interface

ShowPinsAsSelected Method

(IHighlightedModelEditor interface)
Syntax
Procedure ShowPinsAsSelected(AExternalForm      : IExternalForm;
                             APinNameList       : WideString);
Description
Example
See also
IHighlightedModelEditor interface

DrawModel_PinsSelected Method

(IHighlightedModelEditor interface)
Syntax
Procedure DrawModel_PinsSelected(AExternalForm      : IExternalForm;
                                 AModelName         : WideString;
                                 ADataFilePath      : WideString;
                                 APinNameList       : WideString);
Description
Example
See also
IHighlightedModelEditor interface

RegisterListener Method

(IHighlightedModelEditor interface)
Syntax
Procedure RegisterListener(AExternalForm : IExternalForm;
                           AListener     : IModelEditorSelectionListener);
Description
Example
See also
IHighlightedModelEditor interface
 

Integrated Library Enumerated Types

TLibraryType = (eLibIntegrated, eLibSource, eLibDatafile, eLibDatabase, eLibNone, eLibQuery);
 

Integrated Library Constants

cModelType_PCB   = 'PCBLIB';
cModelType_Sim   = 'SIM';
cModelType_PCB3D = 'PCB3DLib';
cModelType_PCAD  = 'PCADLib';
cModelType_SI    = 'SI';
 

Integrated Library Functions

Function ModelTypeManager         : IModelTypeManager;
Function IntegratedLibraryManager : IIntegratedLibraryManager;
Function DeviceSheetManager       : IDeviceSheetManager;

 

You are reporting an issue with the following selected text and/or image within the active document: