IntLib API IModel Interfaces

This documentation page references Altium NEXUS/NEXUS Client (part of the deployed NEXUS solution), which has been discontinued. All your PCB design, data management and collaboration needs can now be delivered by Altium Designer and a connected Altium 365 Workspace. Check out the FAQs page for more information.

Parent page: Technical Reference - Integrated Library API

Please note that this documentation was last updated for an older version of Altium NEXUS. 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: 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 NEXUS. 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 NEXUS 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 NEXUS. The following model names supported by Altium NEXUS 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;