Old Content - visit altium.com/documentation

Parent page: Technical Reference - Schematic API

Schematic API: Component Mapping Interfaces Reference

The Schematic API Component Mapping Interfaces reference includes the following content:

ISch_MapDefiner
ISch_ModelDatafileLink Interface
ISch_Implementation Interface

ISch_MapDefiner

Overview
The ISch_MapDefiner interface represents the object that is used to define a mapping between schematic pins of a schematic component and its model for example the associated PCB pad objects of the PCB component in the same PCB project.

This interface is part of the ISch_Implementation interface. Each component can have a number of implementations (models of the same type and/or different types as well).

The ISch_Implementation.DefinerByInterfaceDesignator returns you theISch_MapDefiner interface with the Designator string representing the component’s designator text string.

Notes
A model represents all the information needed for a component in a given domain, while a datafile entity (or link) is the only information which is in an external file.

A model can be represented by external data sources called data file links. For example, pins of a component can have links to different data files, as for signal integrity models. We will consider each model type in respect to the data file links for the main editor servers supported in Altium Designer.

For the PCB footprints, the model and the data file are both the same.

With the simulation models, you can have a simulation model which is a 4ohm resistor for example, there is a simulation model but there is no information is coming from an external file, therefore, a no external file is needed for this as the resistor model is built from spice. This is the case where you have a model with no data file entity. Thus the parameters are used for these types of simulation models that don’t have data file links.

With signal integrity models, it can have information required for each pin. If we used IBIS datafiles, not the Altium Designer’s central database, then each signal integrity model would then have multiple data files, each one for each type of pin.

The ISch_MapDefiner interface hierarchy is as follows;

ISch_MapDefiner methods
GetState_Designator_Implementation
GetState_Designator_ImplementationCount
GetState_Designator_Interface
GetState_Designators_Implementation_AsString
GetState_IsTrivial
SetState_AllFromString
SetState_Designator_ImplementationAdd
SetState_Designator_ImplementationClear
SetState_Designator_Interface
ISch_MapDefiner properties
Designator_Interface
Designator_ImplementationCount
Designator_Implementation
Designator_Implementations_AsString
IsTrivial

See also
ISch_BasicContainer interface
ISch_Component interface
ISch_Implementation interface

Methods

GetState_Designator_Implementation method

(ISch_MapDefiner interface)
Syntax
Function GetState_Designator_Implementation(Index : Integer) : WideString;
Description
Example
See also
ISch_MapDefiner interface

GetState_Designator_ImplementationCount method

(ISch_MapDefiner interface)
Syntax
Function GetState_Designator_ImplementationCount : Integer;
Description
Example
See also
ISch_MapDefiner interface

GetState_Designator_Interface method

(ISch_MapDefiner interface)
Syntax
Function GetState_Designator_Interface : WideString;
Description
Example
See also
ISch_MapDefiner interface

SetState_AllFromString method

(ISch_MapDefiner interface)
Syntax
Procedure SetState_AllFromString (AValue : WideString);
Description
Example
See also
ISch_MapDefiner interface

SetState_Designator_ImplementationAdd method

(ISch_MapDefiner interface)
Syntax
Procedure SetState_Designator_ImplementationAdd(AValue : WideString);
Description
Example
See also
ISch_MapDefiner interface

SetState_Designator_Interface method

(ISch_MapDefiner interface)
Syntax
Procedure SetState_Designator_Interface(AValue : WideString);
Description
Example
See also
ISch_MapDefiner interface

SetState_Designator_ImplementationClear method

(ISch_MapDefiner interface)
Syntax
Procedure SetState_Designator_ImplementationClear;
Description
Example
See also
ISch_MapDefiner interface

GetState_IsTrivial method

(ISch_MapDefiner interface)
Syntax
Function GetState_IsTrivial : Boolean;
Description
This function determines whether the mapping is trivial or not. Basically the mapping is trivial if there is no other possible mappings. For example if there is only 1 schematic pin and one PCB pad then the map is trivial.
This function is used by the IsTrivial property.
Example
See also
ISch_MapDefiner interface

GetState_Designators_Implementation_AsString method

(ISch_MapDefiner interface)
Syntax
Function GetState_Designators_Implementation_AsString : WideString;
Description
Example
See also
ISch_MapDefiner interface

Properties

Designator_Implementations_AsString property

(ISch_MapDefiner interface)
Syntax
Property Designator_Implementations_AsString : WideString Read GetState_Designators_Implementation_AsString;
Description
Example
See also
ISch_MapDefiner interface

IsTrivial property

(ISch_MapDefiner interface)
Syntax
Property IsTrivial : Boolean Read GetState_IsTrivial;
Description
This property determines whether the mapping is trivial or not. Basically the mapping is trivial if there is no other possible mappings. For example if there is only 1 schematic pin and one PCB pad then the map is trivial.
This property implements the GetState_IsTrivial method.
Example
See also
ISch_MapDefiner interface

Designator_Interface property

(ISch_MapDefiner interface)
Syntax
Property Designator_Interface : WideString Read GetState_Designator_Interface Write SetState_Designator_Interface;
Description
Example
See also
ISch_MapDefiner interface

Designator_ImplementationCount property

(ISch_MapDefiner interface)
Syntax
Property Designator_ImplementationCount : Integer Read GetState_Designator_ImplementationCount;
Description
Example
See also
ISch_MapDefiner interface

Designator_Implementation property

(ISch_MapDefiner interface)
Syntax
Property Designator_Implementation[i : Integer] : WideString Read GetState_Designator_Implementation;
Description
Example
See also
ISch_MapDefiner interface

ISch_ModelDatafileLink Interface

Overview
A model represents all the information needed for a component in a given domain, while a datafile entity (or link) is the only information which is in an external file. A model can be represented by external data sources called data file links. For example, pins of a component can have links to different data files, as for signal integrity models. We will consider each model type in respect to the data file links for the editor servers.

For the PCB footprints, the model and the data file are both the same.

With the simulation models, you can have a simulation model which is a 4ohm resistor for example, there is a simulation model here, but there is no information is coming from an external file, therefore, a no external file is needed for this as the resistor model is built from spice. This is the case where you have a model with no data file entity. Thus the parameters are used for these types of simulation models that don’t have data file links.

With signal integrity models, it can have information required for each pin. If we used IBIS datafiles, not the Altium Designer's central database, then each signal integrity model would then have multiple data files, each one for each type of pin.

A diagram of the relationship between a component and its models:

ISch_ModelDatafileLink methods
GetState_EntityName
GetState_FileKind
GetState_Location
SetState_EntityName
SetState_FileKind
SetState_Location
ISch_ModelDatafileLink properties
EntityName
FileKind
Location

See also
ISch_Component interface
ISch_Implementation interface

Methods

GetState_EntityName method

(ISch_ModelDatafileLink interface)
Syntax
Function GetState_EntityName : WideString;
Description
Example
See also
ISch_ModelDatafileLink interface

GetState_FileKind method

(ISch_ModelDatafileLink interface)
Syntax
Function GetState_FileKind : WideString;
Description
Example
See also
ISch_ModelDatafileLink interface

GetState_Location method

(ISch_ModelDatafileLink interface)
Syntax
Function GetState_Location : WideString;
Description
Example
See also
ISch_ModelDatafileLink interface

SetState_EntityName method

(ISch_ModelDatafileLink interface)
Syntax
Procedure SetState_EntityName(AValue : WideString);
Description
Example
See also
ISch_ModelDatafileLink interface

SetState_FileKind method

(ISch_ModelDatafileLink interface)
Syntax
Procedure SetState_FileKind (AValue : WideString);
Description
Example
See also
ISch_ModelDatafileLink interface

SetState_Location method

(ISch_ModelDatafileLink interface)
Syntax
Procedure SetState_Location (AValue : WideString);
Description
Example
See also
ISch_ModelDatafileLink interface

Properties

EntityName property

(ISch_ModelDatafileLink interface)
Syntax
Property EntityName : WideString Read GetState_EntityName Write SetState_EntityName;
Description
Example
See also
ISch_ModelDatafileLink interface

FileKind property

(ISch_ModelDatafileLink interface)
Syntax
Property FileKind : WideString Read GetState_FileKind Write SetState_FileKind ;
Description
Example
See also
ISch_ModelDatafileLink interface

Location property

(ISch_ModelDatafileLink interface)
Syntax
Property Location : WideString Read GetState_Location Write SetState_Location ;
Description
Example
See also
ISch_ModelDatafileLink interface

ISch_Implementation Interface

Overview
Each schematic component can have models from one or more domains. A schematic component can also have multiple models per domain, one of which will be the current model for that domain.

A model represents all the information needed for a component in a given domain, while a datafile entity (or link) is the only information which is in an external file.

The models of a component are represented by the ISch_Implementation interface.

The mapping of pins of a component and the nodes/pads of a model are represented by the ISch_MapDefiner interfaces.

The link between a model and its external data file links are represented by the ISch_DataFileLink interfaces.

A diagram of the relationship between a component and its models:

Notes
A model can be represented by external data sources called data file links. For example, pins of a component can have links to different data files, as for signal integrity models. We will consider each model type in respect to the data file links for the main editor servers supported in Altium Designer.

For the PCB footprints, the model and the data file are both the same.

With the simulation models, you can have a simulation model which is a 4ohm resistor for example, there is a simulation model here, but there is no information is coming from an external file, therefore, a no external file is needed for this as the resistor model is built from spice. This is the case where you have a model with no data file entity. Thus the parameters are used for these types of simulation models that don’t have data file links.

With signal integrity models, it can have information required for each pin. If we used IBIS datafiles, not the Altium Designer’s central database, then each signal integrity model would then have multiple data files, each one for each type of pin.

A model can also be called an implementation. Each implementation linked to a component can have parameters and data file links.

ISch_Implementation methods
AddDataFileLink
ClearAllDatafileLinks
LockImplementation
Map_Import_FromUser
GetState_DatabaseDatalinksLocked
GetState_DatabaseModel
GetState_DatafileLinkCount
GetState_DatalinksLocked
GetState_Description
GetState_IntegratedModel
GetState_IsCurrent
GetState_MapAsString
GetState_ModelName
GetState_ModelType
GetState_SchDatafileLink
GetState_SchDefinerByInterfaceDesignator
SetState_DatabaseDatalinksLocked
SetState_DatalinksLocked
SetState_DatabaseModel
SetState_Description
SetState_IntegratedModel
SetState_IsCurrent
SetState_MapAsString
SetState_ModelName
SetState_ModelType
ISch_Implementation properties
DatabaseDatalinksLocked
DatabaseModel
DatafileLink
DatafileLinkCount
DatalinksLocked
DefinerByInterfaceDesignator
Description
IntegratedModel
IsCurrent
MapAsString
ModelName
ModelType

See also
ISch_MapDefiner interface
ISch_ModelDatafileLink interface

Methods

AddDataFileLink method

(ISch_Implementation interface)
Syntax
Procedure AddDataFileLink(anEntityName, aLocation, aFileKind : WideString);
Description
Example
See also
ISch_Implementation interface

ClearAllDatafileLinks method

(ISch_Implementation interface)
Syntax
Procedure ClearAllDatafileLinks;
Description
This procedure removes all the data file links of the implementation (model) for the current component.
Example
See also
ISch_Implementation interface

LockImplementation method

(ISch_Implementation interface)
Syntax
Procedure LockImplementation;
Description
Example
See also
ISch_Implementation interface

Map_Import_FromUser method

(ISch_Implementation interface)
Syntax
Function Map_Import_FromUser (AlowOneToMany : Boolean): Boolean;
Description
Example
See also
ISch_Implementation interface

Properties

DatafileLinkCount property

(ISch_Implementation interface)
Syntax
Property DatafileLinkCount : Integer Read GetState_DatafileLinkCount;
Description
This property fetches the number of data file links for the current implementation of the schematic component.
This property is supported by the GetState_DatafileLinkCount function.
Example

 For j := 0 To SchImplementation.DatafileLinkCount - 1 Do Begin     ModelDataFile := SchImplementation.DatafileLink[j];     If ModelDataFile <> Nil Then     Begin         ModelsList.Add('   Implementation Data File Link Details:');         ModelsList.Add('   Data File Location: ' + ModelDataFile.Location +                        ', Entity Name: '         + ModelDataFile.EntityName +                        ', FileKind: '            + ModelDataFile.FileKind);         ModelsList.Add('');     End; End;

See also
ISch_Implementation interface
DataFileLink property

DatabaseModel property

(ISch_Implementation interface)
Syntax
Property DatabaseModel : Boolean Read GetState_DatabaseModel Write SetState_DatabaseModel;
Description
 This property is implemented by the GetState_DatabaseModel and SetState_DatabaseModel methods.
Example
See also
ISch_Implementation interface
IntegratedModel property

DatafileLink property

(ISch_Implementation interface)
Syntax
Property DatafileLink [i : Integer] : ISch_ModelDatafileLink Read GetState_SchDatafileLink;
Description
The DatafileLink property determines the indexed datafilelink of the model type linked to the component. A component can have multiple linked models and each model can have multiple external data file links.
This property is implemented with the GetState_SchDatafileLink(i : Integer) : ISch_ModelDatafileLink method.
Example

 For j := 0 To SchImplementation.DatafileLinkCount - 1 Do Begin     ModelDataFile := SchImplementation.DatafileLink[j];     If ModelDataFile <> Nil Then     Begin         ModelsList.Add('   Implementation Data File Link Details:');         ModelsList.Add('   Data File Location: ' + ModelDataFile.Location +                        ', Entity Name: '         + ModelDataFile.EntityName +                        ', FileKind: '            + ModelDataFile.FileKind);         ModelsList.Add('');     End; End;

See also
ISch_Implementation interface

DatalinksLocked property

(ISch_Implementation interface)
Syntax
Property DatalinksLocked : Boolean Read GetState_DatalinksLocked Write SetState_DatalinksLocked;
Description
Example
See also
ISch_Implementation interface

DefinerByInterfaceDesignator property

(ISch_Implementation interface)
Syntax
Property DefinerByInterfaceDesignator[S : WideString] : ISch_MapDefiner Read GetState_SchDefinerByInterfaceDesignator;
Description
Example
See also
ISch_Implementation interface

Description property

(ISch_Implementation interface)
Syntax
Property Description : WideString Read GetState_Description Write SetState_Description ;
Description
The Description property fetches or sets the Description string for the model. This is optional and is for reference purposes and do not have any impact on simulation processes. This property is implemented by the GetState_Description : WideString and SetState_Description(AValue : WideString) methods.
Example

 SchImplementation := ImplIterator.FirstSchObject; While SchImplementation <> Nil Do Begin     ShowMessage   ('   ModelName: ' + SchImplementation.ModelName +                    ' ModelType: '   + SchImplementation.ModelType +                    ' Description: ' + SchImplementation.Description); End;

See also
ISch_Implementation interface

IntegratedModel property

(ISch_Implementation interface)
Syntax
Property IntegratedModel : Boolean Read GetState_IntegratedModel Write SetState_IntegratedModel;
Description
The property determines whether the implementation is an integrated model type or not.
Example
See also
ISch_Implementation interface
DatabaseModel property

IsCurrent property

(ISch_Implementation interface)
Syntax
Property IsCurrent : Boolean Read GetState_IsCurrent Write SetState_IsCurrent ;
Description
Example
See also
ISch_Implementation interface

MapAsString property

(ISch_Implementation interface)
Syntax
Property MapAsString : WideString Read GetState_MapAsString Write SetState_MapAsString ;
Description
This MapAsString property returns or sets the map of the component pins to a model pins (simulation ports for example) as a string of the following format: (SchematicPinNumber:ModelPinNumber) for example (1:1),(2:2), … ,(X:X)
Example
See also
ISch_Implementation interface

ModelName property

(ISch_Implementation interface)
Syntax
Property ModelName : WideString Read GetState_ModelName Write SetState_ModelName ;
Description
The ModelName property fetches or sets the name of the indexed model name.This property is implemented with GetState_ModelName : WideString and SetState_ModelName(AValue : WideString) methods.
Example
Result := IntegratedLibraryManager.ModelName(Component.LibReference,PathToLibrary,'SIM',0);
See also
ISch_Implementation interface

ModelType property

(ISch_Implementation interface)
Syntax
Property ModelType : WideString Read GetState_ModelType Write SetState_ModelType ;
Description
Example
See also
ISch_Implementation interface

UseComponentLibrary

(ISch_Implementation interface)
Syntax
Property UseComponentLibrary     : Boolean    Read GetState_UseComponentLibrary     Write SetState_UseComponentLibrary;
Description
This UseComponentLibrary property determines whether the component is from an integrated library or not (either as an installed library or part of the Project Libraries. This is accessed from the Available Libraries dialog in Altium Designer). A Boolean value is returned. This property is implemented with GetState_UseComponentLibrary : Boolean and SetState_UseComponentLibrary(AValue : Boolean) methods.
Example
See also
ISch_Implementation interface

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