Contact Us
Contact our corporate or local offices directly.
Parent page: Technical Reference - Integrated Library API
The Integrated Library API IModel Interfaces Reference includes the following sections and content:
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 interface)
Syntax
Function CreateDatafile (ADatafilePath : PChar) : IModelDatafile;
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Function CreateServerModel (AModel : IComponentImplementation) : IServerModel;
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Procedure CrossProbeEntity (AEntityName : WideString;ADataFilePath : WideString);
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Procedure DrawModel (AExternalForm : IExternalForm;AModelName : PChar;ADataFilePath : PChar);
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Procedure DrawModelToMetaFile (Const AFileName : WideString;Const AModelName : WideString;Const ADataFilePath : WideString;APaintColorMode : TPaintColorMode;APaintScaleMode : TPaintScaleMode);
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Function EditModel (SchModel : ISch_Implementation; SchComp : ISch_Component;IsLibrary : Boolean) : Boolean;
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Procedure FinishedLibraryCompile;
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Function GetEntityParameters (AEntityName : WideString; ADataFilePath : WideString) : WideString;
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Function GetExternalForm : IExternalForm;
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Function PrepareModel (AModel : IComponentImplementation) : Boolean;
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Procedure StartingLibraryCompile;
Description
Example
See also
IModelEditor interface
(IModelEditor interface)
Syntax
Function SetDefaultModelState (SchModel : ISch_Implementation;SchComp : ISch_Component;IsLibrary : Boolean) : Boolean;
Description
Example
See also
IModelEditor 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 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
(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
(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
(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
(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
(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
(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
(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
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 interface)
Syntax
Procedure AddPort (AName : PChar);
Description
See also
IServerModel interface
(IServerModel interface)
Syntax
Function Name : PChar;
Description
The function gives the name for the Server Model.
See also
IServerModel interface
(IServerModel interface)
Syntax
Function PortName (AnIndex : Integer) : PChar;
Description
Example
See also
IServerModel interface
(IServerModel interface)
Syntax
Function PortCount : Integer;
Description
This function returns the number of ports for this Server Model.
See also
IServerModel interface
(IServerModel interface)
Syntax
Function CheckSchPins : Boolean
Description
Example
See also
IServerModel interface
(IServerModel interface)
Syntax
Function CheckModelPins : Boolean;
Description
Example
See also
IServerModel interface
(IServerModel interface)
Syntax
Property PortNames[AnIndex : Integer] : PChar Read PortName;
Description
Example
See also
IServerModel interface
Overview
IModelEditorSelectionListener methods PinSelectionChanged |
IModelEditorSelectionListener properties |
See also
Overview
IHighlightedModelEditor Methods and Properties Table
IHighlightedModelEditor methods HighlightComponentPins ShowSpecifiedPinsOnly ShowPinsAsSelected DrawModel_PinsSelected RegisterListener |
IHighlightedModelEditor properties |
See also
IModelType interface
(IHighlightedModelEditor interface)
Syntax
Procedure HighlightComponentPins(AExternalForm : IExternalForm;
APinNameList : WideString;
AHighlightColor : TColor;
ANonHighlightColor : TColor);
Description
Example
See also
IHighlightedModelEditor interface
(IHighlightedModelEditor interface)
Syntax
Procedure ShowSpecifiedPinsOnly (AExternalForm : IExternalForm;
APinNameList : WideString);
Description
Example
See also
IHighlightedModelEditor interface
(IHighlightedModelEditor interface)
Syntax
Procedure ShowPinsAsSelected(AExternalForm : IExternalForm;
APinNameList : WideString);
Description
Example
See also
IHighlightedModelEditor interface
(IHighlightedModelEditor interface)
Syntax
Procedure DrawModel_PinsSelected(AExternalForm : IExternalForm;
AModelName : WideString;
ADataFilePath : WideString;
APinNameList : WideString);
Description
Example
See also
IHighlightedModelEditor interface
(IHighlightedModelEditor interface)
Syntax
Procedure RegisterListener(AExternalForm : IExternalForm;
AListener : IModelEditorSelectionListener);
Description
Example
See also
IHighlightedModelEditor interface
TLibraryType = (eLibIntegrated, eLibSource, eLibDatafile, eLibDatabase, eLibNone, eLibQuery);
cModelType_PCB = 'PCBLIB';
cModelType_Sim = 'SIM';
cModelType_PCB3D = 'PCB3DLib';
cModelType_PCAD = 'PCADLib';
cModelType_SI = 'SI';
Function ModelTypeManager : IModelTypeManager;
Function IntegratedLibraryManager : IIntegratedLibraryManager;
Function DeviceSheetManager : IDeviceSheetManager;
Contact our corporate or local offices directly.