Skip to main content
View as Markdown

IIntegratedLibraryManager interface

The IIntegratedLibraryManager interface represents the integrated library manager that manages schematic components and its models from installed libraries in Altium Designer.

public interface IIntegratedLibraryManager

Namespace: SCH · Assembly: Altium.SDK.Interfaces

Remarks​

Invoke the IntegratedLibraryManager method to fetch the IIntegratedLibraryManager interface.

Methods​

MethodReturnsDescription
AddRemoveLibrariesvoidThis method invokes the Available Libraries dialog with a list of installed libraries if any and their activated, path and type values.
AvailableLibraryCountintThe AvailableLibraryCount method determines the number of available libraries.
AvailableLibraryPathstringThe AvailableLibraryPath method retrieves the file path of the indexed library in the Available Libraries dialog.
AvailableLibraryTypeTLibraryTypeThe AvailableLibraryType method determines what type the indexed library is.
BrowseComponentbool
BrowseDatafileEntitybool
BrowseDatafileEntityInDatafilebool
BrowseForComponentvoidThis BrowseForDataFile method invokes the Browse for Components dialog.
BrowseForComponentAndPartvoidThis BrowseForComponentAndPart method invokes the Browse for Parts dialog.
BrowseForComponentAndPartCheckDBLibsvoid
BrowseForComponentCheckDBLibsvoid
BrowseForDatafilevoidThis BrowseForDataFile method invokes the Browse Libraries dialog.
BrowseModelbool
BrowseSymbolbool
BrowseSymbolRevisionbool
ComponentHasModelOfTypeboolThis method checks if this indexed component from the specified library has this model type.
CreateIntegratedLibraryvoidThis CreateIntegratedLibrary method creates an integrated library from a project into the specified path and, depending on a flag, installs it in the Available Libraries dialog.
ExtractSourcesvoidThis ExtractSources method extracts the source files such as PCBLIB and PCB3DLIb files from the Integrated Library specified by its ALibraryPath parameter.
ExtractSourcesToDatabaseLibstring
ExtractSourcesToDesignItemManagerstring
ExtractSourcesToPathvoidThis ExtractSources method extracts the source files such as PCBLIB and PCB3DLIb files to the destination path (ADestinationPath parameter) from the Integrated Library specified by its ALibraryPath p…
FindComponentDesignItemDeviceSheetbool
FindComponentDisplayPathstring
FindComponentLibraryPathstringThe method returns the path of the library the component is part of.
FindComponentSymbolboolThe method validates whether if the component symbol is available or not dependent on the supplied parameters.
FindDatafileEntityDatafilePathstringThe method returns the path of the library the component is part of.
FindDatafileEntityLibraryPathstring
FindDatafileEntitySourceDatafilePathstringThis method returns the path of the data file in library .
FindDatafileEntitySourceLibraryPathstring
FindDatafileInStandardLibsstringThis method returns the path of the data file for the specified model in an integrated library.
FindDeviceSheetByFileNamebool
FindLibraryInformationboolThe method validates the existence of the library.
FindModelLibraryPathstringThe method returns the path of the library the model is part of.
GetAllParametersFromSourceLibstring
GetAvailableDBLibDocAtPathIDatabaseLibDocument
GetCachedFullFilePathFromExplicitFileNamebool
GetComponentCountintThis method retrieves the count of components within the specified integrated library.
GetComponentDatafileLocationstringThis GetComponentDatafileLocation method obtains the location of the datafile for the component with the specified data file index, model name and its model type, component name and the full library.
GetComponentLocationstringThis GetComponentLocation returns the path of the specified component name within the specified library.
GetComponentLocationFromDatabasestring
GetComponentNamestringThis method retrieves the name for the indexed component within the specified integrated library.
GetComponentPlacementParametersstring
GetDatabaseDatafileLocationstring
GetDatabaseModelFullLibPathstring
GetDatafileEntityCountintThis method gets datafile entity count for the specified component and its indexed model in the specified library path.
GetDatafilePathstringThis method gets datafile path for the specified component, its indexed model and its indexed datafile in the specified library path.
GetFirstLibraryFullPathForLibRefstring
GetLifeCycleStatestring
GetModelIModel
GetModelCountintThis method retrieves the model count for the indexed component within the specified library.
GetModelNamestringThis method retrieves the model name for the indexed component within the specified library.
GetModelTypeIModelTypeThis method retrieves the model type for the indexed component within the specified library.
GetOrderedRevisionListbool
GetParameterCountint
GetParameterNamestring
GetParametersForDBComponentstring
GetParameterValuestring
GetSchLibPathForDBComponentstring
GetSchLibRefForDBComponentstring
GetWorkingFileNameFromCacheFileNamestring
InstalledLibraryCountintThis InstalledLibraryCount method reports the number of installed libraries as in the Installed tab of the Available Libraries dialog in Altium Designer.
InstalledLibraryPathstringThis InstalledLibraryPath method retrieves the path of the indexed installed library in Altium Designer.
InstallLibraryvoidThis method installs the library (full path) in the Available Libraries dialog (in the Installed page) in Altium Designer.
IsParameterDatabaseKeybool
MakeCurrentProjectvoidThis method makes the current library in the Libraries panel based on the project.
ModelCountintThis ModelCount method returns the number of models of the same type associated with the component within the specified library.
ModelNamestringThis ModelName method returns the name of the model type associated with the component within a specified library.
ParseDatabaseKeysstring
PlaceLibraryComponentboolThis method places a component from a specified library with Library Reference and Parameters that describe/define this component.
UninstallLibraryvoidThis method removes the specified library (full path) in the Available Libraries dialog (in the Installed page) in Altium Designer
UpdateCachedFileIfNecessaryvoid

AddRemoveLibraries​

This method invokes the Available Libraries dialog with a list of installed libraries if any and their activated, path and type values.

void AddRemoveLibraries();

Returns: nothing (void)

Example: Open the dialog that adds and removes libraries.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
intMan.AddRemoveLibraries();

AvailableLibraryCount​

The AvailableLibraryCount method determines the number of available libraries. Note, the first installed library in the Available Libraries dialog is indexed zero (0).

int AvailableLibraryCount();

Returns: int

An available library is one of the libraries on the Installed, Project and Search path tabs within the Available Libraries dialog.

An installed library appears in the Installed tab of the Available Libraries dialog.

Example: Show the number of available libraries.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
DXP.Utils.ShowMessage(intMan.AvailableLibraryCount().ToString());

See also: IIntegratedLibraryManager.AvailableLibraryPath, IIntegratedLibraryManager.AvailableLibraryType

AvailableLibraryPath​

The AvailableLibraryPath method retrieves the file path of the indexed library in the Available Libraries dialog. Note, the first installed library in the Available Libraries dialog is indexed zero (0).

string AvailableLibraryPath(int argLibraryIndex);
ParameterTypePassing
argLibraryIndexintvalue

Returns: string

An available library is one of the libraries on the Installed, Project and Search path tabs within the Available Libraries dialog.

An installed library appears in the Installed tab of the Available Libraries dialog.

Example: Show the path of the first available library.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
DXP.Utils.ShowMessage(intMan.AvailableLibraryPath(0));

Examples: Extension_TestCS

AvailableLibraryType​

The AvailableLibraryType method determines what type the indexed library is. Note, the first installed library in the Available Libraries dialog is indexed zero (0).

TLibraryType AvailableLibraryType(int argLibraryIndex);
ParameterTypePassing
argLibraryIndexintvalue

Returns: TLibraryType

Extension method of IIntegratedLibraryManagerHelper (using SCH;).

An available library is one of the libraries on the Installed, Project and Search path tabs within the Available Libraries dialog.

An installed library appears in the Installed tab of the Available Libraries dialog.

Example: Show the type of the first available library.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
TLibraryType libType = intMan.AvailableLibraryType(0);
switch (libType)
{
case TLibraryType.eLibIntegrated: DXP.Utils.ShowMessage("Integrated"); break;
case TLibraryType.eLibSource: DXP.Utils.ShowMessage("Lib Source"); break;
case TLibraryType.eLibDatafile: DXP.Utils.ShowMessage("Lib data File"); break;
case TLibraryType.eLibDatabase: DXP.Utils.ShowMessage("Database"); break;
case TLibraryType.eLibNone: DXP.Utils.ShowMessage("None"); break;
case TLibraryType.eLibQuery: DXP.Utils.ShowMessage("Query"); break;
case TLibraryType.eLibDesignItems: DXP.Utils.ShowMessage("Design Items"); break;
}

See also: TLibraryType

BrowseComponent​

No description yet.

bool BrowseComponent(TLibIdentifierKind argLibIdentifierKind, ref string argLibraryIdentifier, ref string argDesignItemID, ref int argPartID, out string argSymbolReference, out string argSymbolLibraryPath, ref string argModelName, string argModelType, out string argModelLibraryPath);
bool BrowseComponent(int argLibIdentifierKind, ref string argLibraryIdentifier, ref string argDesignItemID, ref int argPartID, out string argSymbolReference, out string argSymbolLibraryPath, ref string argModelName, string argModelType, out string argModelLibraryPath);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringref
argDesignItemIDstringref
argPartIDintref
argSymbolReferencestringout
argSymbolLibraryPathstringout
argModelNamestringref
argModelTypestringvalue
argModelLibraryPathstringout

Returns: bool

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

BrowseDatafileEntity​

No description yet.

bool BrowseDatafileEntity(TLibIdentifierKind argLibIdentifierKind, ref string argLibraryIdentifier, ref string argDatafileEntityName, string argDatafileType, out string argDatafilePath);
bool BrowseDatafileEntity(int argLibIdentifierKind, ref string argLibraryIdentifier, ref string argDatafileEntityName, string argDatafileType, out string argDatafilePath);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringref
argDatafileEntityNamestringref
argDatafileTypestringvalue
argDatafilePathstringout

Returns: bool

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

BrowseDatafileEntityInDatafile​

No description yet.

bool BrowseDatafileEntityInDatafile(TLibIdentifierKind argLibIdentifierKind, ref string argLibraryIdentifier, ref string argDatafileEntityName, string argDatafileType, out string argDatafilePath, bool argUseIntAndDBLibrary);
bool BrowseDatafileEntityInDatafile(int argLibIdentifierKind, ref string argLibraryIdentifier, ref string argDatafileEntityName, string argDatafileType, out string argDatafilePath, bool argUseIntAndDBLibrary);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringref
argDatafileEntityNamestringref
argDatafileTypestringvalue
argDatafilePathstringout
argUseIntAndDBLibraryboolvalue

Returns: bool

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

BrowseForComponent​

This BrowseForDataFile method invokes the Browse for Components dialog.

void BrowseForComponent(ref string argLibReference, ref string argSCHLibraryPath, ref string argSelModelName, ref string argSelModelLib, ref string argLibPath, ref string argModelType);
ParameterTypePassing
argLibReferencestringref
argSCHLibraryPathstringref
argSelModelNamestringref
argSelModelLibstringref
argLibPathstringref
argModelTypestringref

Returns: nothing (void)

BrowseForComponentAndPart​

This BrowseForComponentAndPart method invokes the Browse for Parts dialog.

void BrowseForComponentAndPart(ref string argLibReference, ref string argSCHLibraryPath, ref string argSelModelName, ref string argSelModelLib, ref string argLibPath, ref string argModelType, ref int argPartID);
ParameterTypePassing
argLibReferencestringref
argSCHLibraryPathstringref
argSelModelNamestringref
argSelModelLibstringref
argLibPathstringref
argModelTypestringref
argPartIDintref

Returns: nothing (void)

BrowseForComponentAndPartCheckDBLibs​

No description yet.

void BrowseForComponentAndPartCheckDBLibs(ref string argLibReference, ref string argSCHLibraryPath, ref string argSelModelName, ref string argSelModelLib, ref string argLibPath, ref string argModelType, ref string argDatabaseTableName, ref string argDatabaseKeys, ref int argPartID);
ParameterTypePassing
argLibReferencestringref
argSCHLibraryPathstringref
argSelModelNamestringref
argSelModelLibstringref
argLibPathstringref
argModelTypestringref
argDatabaseTableNamestringref
argDatabaseKeysstringref
argPartIDintref

Returns: nothing (void)

BrowseForComponentCheckDBLibs​

No description yet.

void BrowseForComponentCheckDBLibs(ref string argLibReference, ref string argSCHLibraryPath, ref string argSelModelName, ref string argSelModelLib, ref string argLibPath, ref string argModelType, ref string argDatabaseTable, ref string argDatabaseKeys);
ParameterTypePassing
argLibReferencestringref
argSCHLibraryPathstringref
argSelModelNamestringref
argSelModelLibstringref
argLibPathstringref
argModelTypestringref
argDatabaseTablestringref
argDatabaseKeysstringref

Returns: nothing (void)

BrowseForDatafile​

This BrowseForDataFile method invokes the Browse Libraries dialog.

void BrowseForDatafile(ref string argModelName, ref string argModelPath, ref string argLibPath, ref string argModelType, bool argForComponentInstance);
ParameterTypePassing
argModelNamestringref
argModelPathstringref
argLibPathstringref
argModelTypestringref
argForComponentInstanceboolvalue

Returns: nothing (void)

Example: Let the user browse for a footprint in an integrated library.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
// Placeholders: the library and the footprint to start from.
string libraryPath = "<path of an .IntLib file>";
string modelType = "PCBLIB";
string aFootprintName = "<footprint name>";

intMan.BrowseForDatafile(ref aFootprintName, ref libraryPath, ref libraryPath, ref modelType, true);

BrowseModel​

No description yet.

bool BrowseModel(TLibIdentifierKind argLibIdentifierKind, ref string argLibraryIdentifier, ref string argDesignItemID, ref string argModelName, string argModelType, out string argModelLibraryPath);
bool BrowseModel(int argLibIdentifierKind, ref string argLibraryIdentifier, ref string argDesignItemID, ref string argModelName, string argModelType, out string argModelLibraryPath);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringref
argDesignItemIDstringref
argModelNamestringref
argModelTypestringvalue
argModelLibraryPathstringout

Returns: bool

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

BrowseSymbol​

No description yet.

bool BrowseSymbol(TLibIdentifierKind argLibIdentifierKind, ref string argLibraryIdentifier, ref string argDesignItemID, out string argSymbolReference, out string argSymbolLibraryPath);
bool BrowseSymbol(int argLibIdentifierKind, ref string argLibraryIdentifier, ref string argDesignItemID, out string argSymbolReference, out string argSymbolLibraryPath);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringref
argDesignItemIDstringref
argSymbolReferencestringout
argSymbolLibraryPathstringout

Returns: bool

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

BrowseSymbolRevision​

No description yet.

bool BrowseSymbolRevision(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, ref string argDesignItemID, out string argSymbolReference, out string argSymbolLibraryPath, out string argRevisionStatus);
bool BrowseSymbolRevision(int argLibIdentifierKind, string argLibraryIdentifier, ref string argDesignItemID, out string argSymbolReference, out string argSymbolLibraryPath, out string argRevisionStatus);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringvalue
argDesignItemIDstringref
argSymbolReferencestringout
argSymbolLibraryPathstringout
argRevisionStatusstringout

Returns: bool

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

ComponentHasModelOfType​

This method checks if this indexed component from the specified library has this model type. Model Types include:

bool ComponentHasModelOfType(string argLibraryPath, int argComponentIndex, string argModelType);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue
argModelTypestringvalue

Returns: bool

PCBLIB

PCB3DLIB

SIM

SI

Example: Check whether the first component of a library has a footprint model.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
string libraryPath = "<library path>";

int componentIndex = 0;
bool status = intMan.ComponentHasModelOfType(libraryPath, componentIndex, "PCBLIB");
if (status)
DXP.Utils.ShowMessage("True");
else
DXP.Utils.ShowMessage("False");

CreateIntegratedLibrary​

This CreateIntegratedLibrary method creates an integrated library from a project into the specified path and, depending on a flag, installs it in the Available Libraries dialog.

void CreateIntegratedLibrary(IProject argProject, string argnOutputPath, bool argInstall);
void CreateIntegratedLibrary(object argProject, string argnOutputPath, bool argInstall);
ParameterTypePassingDescription
argProjectIProjectvalueThe project the integrated library is created from.
argnOutputPathstringvalueThe path the integrated library is created into.
argInstallboolvalueDetermines whether the integrated library is installed in the Available Libraries dialog.

Returns: nothing (void)

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

ExtractSources​

This ExtractSources method extracts the source files such as PCBLIB and PCB3DLIb files from the Integrated Library specified by its ALibraryPath parameter.

void ExtractSources(string argLibraryPath);
ParameterTypePassing
argLibraryPathstringvalue

Returns: nothing (void)

Example: Extract the source libraries of every integrated library in a folder.

using System.IO;
using System.Linq;
using SCH;

IIntegratedLibraryManager integratedLibraryManager = EDP.Utils.LoadIntegratedLibraryManager();
if (integratedLibraryManager == null)
return;
// Placeholder: the folder that contains the .IntLib files.
string sourceFolder = "<folder containing IntLib files>";

if (Directory.Exists(sourceFolder))
{
string[] filesList = Directory.GetFiles(sourceFolder, "*.IntLib")
.Distinct(StringComparer.OrdinalIgnoreCase)
.OrderBy(f => f, StringComparer.OrdinalIgnoreCase)
.ToArray();
for (int i = 0; i < filesList.Length; i++)
integratedLibraryManager.ExtractSources(filesList[i]);
}

ExtractSourcesToDatabaseLib​

No description yet.

string ExtractSourcesToDatabaseLib(string argLibraryPath, IDatabaseLibDocument argDatabaseLib, string argnAbsoluteOutputPath, string argRelativeOutputPath);
string ExtractSourcesToDatabaseLib(string argLibraryPath, object argDatabaseLib, string argnAbsoluteOutputPath, string argRelativeOutputPath);
ParameterTypePassing
argLibraryPathstringvalue
argDatabaseLibIDatabaseLibDocumentvalue
argnAbsoluteOutputPathstringvalue
argRelativeOutputPathstringvalue

Returns: string

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

ExtractSourcesToDesignItemManager​

No description yet.

string ExtractSourcesToDesignItemManager(string argLibraryPath, string argDestinationPath, out string argParameters);
ParameterTypePassing
argLibraryPathstringvalue
argDestinationPathstringvalue
argParametersstringout

Returns: string

ExtractSourcesToPath​

This ExtractSources method extracts the source files such as PCBLIB and PCB3DLIb files to the destination path (ADestinationPath parameter) from the Integrated Library specified by its ALibraryPath parameter.

void ExtractSourcesToPath(string argLibraryPath, string argDestinationPath);
ParameterTypePassing
argLibraryPathstringvalue
argDestinationPathstringvalue

Returns: nothing (void)

FindComponentDesignItemDeviceSheet​

No description yet.

bool FindComponentDesignItemDeviceSheet(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, out string argDeviceSheetPath);
bool FindComponentDesignItemDeviceSheet(int argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, out string argDeviceSheetPath);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringvalue
argDesignItemIDstringvalue
argDeviceSheetPathstringout

Returns: bool

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

FindComponentDisplayPath​

No description yet.

string FindComponentDisplayPath(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID);
string FindComponentDisplayPath(int argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringvalue
argDesignItemIDstringvalue

Returns: string

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

FindComponentLibraryPath​

The method returns the path of the library the component is part of.

string FindComponentLibraryPath(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID);
string FindComponentLibraryPath(int argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID);
ParameterTypePassingDescription
argLibIdentifierKindTLibIdentifierKindvalueDenotes which type of library the component is from.
argLibraryIdentifierstringvalueThe library identifier string that the component is associated with.
argDesignItemIDstringvalueThe symbol reference (library reference) of the component from a Schematic or Integrated Library, or a unique part number from a record within a table of a Database.

Returns: string

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

Example: List the component and model library paths of the components on the current schematic sheet.

using System.Collections.Generic;
using SCH;

IIntegratedLibraryManager integratedLibraryManager = EDP.Utils.LoadIntegratedLibraryManager();
ISch_Document currentSheet = SCH.GlobalVars.SchServer?.GetCurrentSchDocument();
if (integratedLibraryManager == null || currentSheet == null)
return;
var modelsList = new List<string>();

ISch_Iterator componentIterator = currentSheet.SchIterator_Create();
componentIterator.AddFilter_ObjectSet(new SCH.TObjectSet { TObjectId.eSchComponent });
try
{
for (var component = componentIterator.FirstSchObject() as ISch_Component; component != null; component = componentIterator.NextSchObject() as ISch_Component)
{
// For each component found on the schematic, you can iterate for its implementations.
ISch_Iterator implementationIterator = component.SchIterator_Create();
implementationIterator.AddFilter_ObjectSet(new SCH.TObjectSet { TObjectId.eImplementation });
for (var schImplementation = implementationIterator.FirstSchObject() as ISch_Implementation; schImplementation != null; schImplementation = implementationIterator.NextSchObject() as ISch_Implementation)
{
if (schImplementation.GetState_UseComponentLibrary())
{
string componentPath = integratedLibraryManager.FindComponentLibraryPath(component.GetState_LibIdentifierKind(),
component.GetState_LibraryIdentifier(), component.GetState_DesignItemId());
string modelPath = integratedLibraryManager.FindModelLibraryPath(component.GetState_LibIdentifierKind(),
component.GetState_LibraryIdentifier(), component.GetState_DesignItemId(),
schImplementation.GetState_ModelName(), schImplementation.GetState_ModelType());
modelsList.Add(" The Component is in Integrated Library");
modelsList.Add(" Component path: " + componentPath);
modelsList.Add(" Model path: " + modelPath);
}
}
component.SchIterator_Destroy(ref implementationIterator);
}
}
finally
{
currentSheet.SchIterator_Destroy(ref componentIterator);
}

FindComponentSymbol​

The method validates whether if the component symbol is available or not dependent on the supplied parameters.

bool FindComponentSymbol(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, out string argSymbolLibraryPath, out string argSymbolReference);
bool FindComponentSymbol(int argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, out string argSymbolLibraryPath, out string argSymbolReference);
ParameterTypePassingDescription
argLibIdentifierKindTLibIdentifierKindvalueDenotes which type of library the component is from.
argLibraryIdentifierstringvalueThe library identifier string that the component is associated with.
argDesignItemIDstringvalueThe symbol reference (library reference) of the component from a Schematic or Integrated Library, or a unique part number from a record within a table of a Database.
argSymbolLibraryPathstringoutThe library.
argSymbolReferencestringoutThe name of the component symbol.

Returns: bool

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

Example: Find the symbol library and symbol of every component on the current schematic sheet.

using SCH;

IIntegratedLibraryManager integratedLibraryManager = EDP.Utils.LoadIntegratedLibraryManager();
ISch_Document currentSheet = SCH.GlobalVars.SchServer?.GetCurrentSchDocument();
if (integratedLibraryManager == null || currentSheet == null)
return;
ISch_Iterator iterator = currentSheet.SchIterator_Create();
iterator.AddFilter_ObjectSet(new SCH.TObjectSet { TObjectId.eSchComponent });
try
{
for (var aPart = iterator.FirstSchObject() as ISch_Component; aPart != null; aPart = iterator.NextSchObject() as ISch_Component)
{
string symbolLibraryPath, symbolReference;
string newSymbolLibraryPath, newSymbolReference;
if (integratedLibraryManager.FindComponentSymbol(aPart.GetState_LibIdentifierKind(), aPart.GetState_LibraryIdentifier(),
aPart.GetState_DesignItemId(), out symbolLibraryPath, out symbolReference))
{
newSymbolLibraryPath = symbolLibraryPath;
newSymbolReference = symbolReference;
}
else
{
newSymbolLibraryPath = "";
newSymbolReference = "";
}
}
}
finally
{
currentSheet.SchIterator_Destroy(ref iterator);
}

FindDatafileEntityDatafilePath​

The method returns the path of the library the component is part of.

string FindDatafileEntityDatafilePath(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDatafileEntityName, string argDatafileType, bool argUseIntAndDBLibrary);
string FindDatafileEntityDatafilePath(int argLibIdentifierKind, string argLibraryIdentifier, string argDatafileEntityName, string argDatafileType, bool argUseIntAndDBLibrary);
ParameterTypePassingDescription
argLibIdentifierKindTLibIdentifierKindvalueDenotes which type of library the component is from.
argLibraryIdentifierstringvalueThe library identifier string that the component is associated with.
argDatafileEntityNamestringvalue
argDatafileTypestringvalue
argUseIntAndDBLibraryboolvalue

Returns: string

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

Example: List the library and data file paths of the simulation models of the components on the current schematic sheet.

using System.Collections.Generic;
using SCH;

IIntegratedLibraryManager integratedLibraryManager = EDP.Utils.LoadIntegratedLibraryManager();
ISch_Document currentSheet = SCH.GlobalVars.SchServer?.GetCurrentSchDocument();
if (integratedLibraryManager == null || currentSheet == null)
return;
var modelsList = new List<string>();

ISch_Iterator componentIterator = currentSheet.SchIterator_Create();
componentIterator.AddFilter_ObjectSet(new SCH.TObjectSet { TObjectId.eSchComponent });
try
{
for (var component = componentIterator.FirstSchObject() as ISch_Component; component != null; component = componentIterator.NextSchObject() as ISch_Component)
{
// For each component found on the schematic, you can iterate for its implementations.
ISch_Iterator implementationIterator = component.SchIterator_Create();
implementationIterator.AddFilter_ObjectSet(new SCH.TObjectSet { TObjectId.eImplementation });
for (var schImplementation = implementationIterator.FirstSchObject() as ISch_Implementation; schImplementation != null; schImplementation = implementationIterator.NextSchObject() as ISch_Implementation)
{
if (schImplementation.GetState_DatafileLinkCount() > 0)
{
// Assumption: use the first data file link for the simulation model since we
// normally only use one sim model per component.
ISch_ModelDatafileLink modelDataFile = schImplementation.GetState_SchDatafileLink(0);
string sourceLibraryPath = integratedLibraryManager.FindDatafileEntitySourceLibraryPath(modelDataFile.GetState_LibIdentifierKind(),
modelDataFile.GetState_LibraryIdentifier(), modelDataFile.GetState_EntityName(), modelDataFile.GetState_FileKind());
string libraryPath = integratedLibraryManager.FindDatafileEntityLibraryPath(modelDataFile.GetState_LibIdentifierKind(),
modelDataFile.GetState_LibraryIdentifier(), modelDataFile.GetState_EntityName(), modelDataFile.GetState_FileKind());
string sourceDatafilePath = integratedLibraryManager.FindDatafileEntitySourceDatafilePath(modelDataFile.GetState_LibIdentifierKind(),
modelDataFile.GetState_LibraryIdentifier(), modelDataFile.GetState_EntityName(), modelDataFile.GetState_FileKind(), true);
string datafilePath = integratedLibraryManager.FindDatafileEntityDatafilePath(modelDataFile.GetState_LibIdentifierKind(),
modelDataFile.GetState_LibraryIdentifier(), modelDataFile.GetState_EntityName(), modelDataFile.GetState_FileKind(), true);
modelsList.Add(" Model : DatafilelinkCount > 0");
modelsList.Add(" Source Library path: " + sourceLibraryPath);
modelsList.Add(" Library path: " + libraryPath);
modelsList.Add(" Source datafile path: " + sourceDatafilePath);
modelsList.Add(" Datafile path: " + datafilePath);
}
}
component.SchIterator_Destroy(ref implementationIterator);
}
}
finally
{
currentSheet.SchIterator_Destroy(ref componentIterator);
}

FindDatafileEntityLibraryPath​

No description yet.

string FindDatafileEntityLibraryPath(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDatafileEntityName, string argDatafileType);
string FindDatafileEntityLibraryPath(int argLibIdentifierKind, string argLibraryIdentifier, string argDatafileEntityName, string argDatafileType);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringvalue
argDatafileEntityNamestringvalue
argDatafileTypestringvalue

Returns: string

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

FindDatafileEntitySourceDatafilePath​

This method returns the path of the data file in library .

string FindDatafileEntitySourceDatafilePath(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDatafileEntityName, string argDatafileType, bool argUseIntAndDBLibrary);
string FindDatafileEntitySourceDatafilePath(int argLibIdentifierKind, string argLibraryIdentifier, string argDatafileEntityName, string argDatafileType, bool argUseIntAndDBLibrary);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringvalue
argDatafileEntityNamestringvalue
argDatafileTypestringvalue
argUseIntAndDBLibraryboolvalue

Returns: string

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

FindDatafileEntitySourceLibraryPath​

No description yet.

string FindDatafileEntitySourceLibraryPath(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDatafileEntityName, string argDatafileType);
string FindDatafileEntitySourceLibraryPath(int argLibIdentifierKind, string argLibraryIdentifier, string argDatafileEntityName, string argDatafileType);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringvalue
argDatafileEntityNamestringvalue
argDatafileTypestringvalue

Returns: string

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

FindDatafileInStandardLibs​

This method returns the path of the data file for the specified model in an integrated library.

string FindDatafileInStandardLibs(string argDatafileEntityName, string argDatafileType, string argDatafileLocation, bool argForComponentInstance, ref string argFoundInLibraryPath);
ParameterTypePassingDescription
argDatafileEntityNamestringvalueThe footprint name, 3D model name, Sim name or SI name. Required.
argDatafileTypestringvalueDenotes the model type represented by the datafiletype (PCB, PCB3DLIB, SIM, SI).
argDatafileLocationstringvalueOptional.
argForComponentInstanceboolvalueTrue if it is in an integrated library, false otherwise.
argFoundInLibraryPathstringrefReturns the location of the data file if all the supplied parameters are valid.

Returns: string

Example: Install a footprint library and find a footprint in the installed libraries.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
intMan.InstallLibrary("<path of a .PcbLib file>");
bool inIntLib = false;
string foundLocation = "";
intMan.FindDatafileInStandardLibs("<footprint name>", "PCBLIB", "", inIntLib, ref foundLocation);
DXP.Utils.ShowMessage(foundLocation);

Examples: Extension_PartComment

FindDeviceSheetByFileName​

No description yet.

bool FindDeviceSheetByFileName(string argFileName, out string argDesignItemID, out string argLibraryIdentifier);
ParameterTypePassing
argFileNamestringvalue
argDesignItemIDstringout
argLibraryIdentifierstringout

Returns: bool

FindLibraryInformation​

The method validates the existence of the library.

bool FindLibraryInformation(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, out string argLibraryPath, out string argDBTableName);
bool FindLibraryInformation(int argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, out string argLibraryPath, out string argDBTableName);
ParameterTypePassingDescription
argLibIdentifierKindTLibIdentifierKindvalueDenotes which type of library the component is from.
argLibraryIdentifierstringvalueThe library identifier string that the component is associated with. Normally a path to a library.
argDesignItemIDstringvalueThe symbol reference (library reference) of the component from a Schematic or Integrated Library, or a unique part number from a record within a table of a Database.
argLibraryPathstringoutReturned for the valid design item of a component.
argDBTableNamestringoutReturned if a component is from a database.

Returns: bool

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

Example: Find the path of the library that holds a component.

using SCH;

IIntegratedLibraryManager integratedLibraryManager = EDP.Utils.LoadIntegratedLibraryManager();
if (integratedLibraryManager == null)
return;
// Placeholders: the library identifier and the design item ID of the component.
string aLibraryIdentifier = "<library identifier>";
string aDesignItemID = "<design item ID>";

string path, dbTableName;
if (!integratedLibraryManager.FindLibraryInformation(EDP.TLibIdentifierKind.eLibIdentifierKind_NameWithType, aLibraryIdentifier,
aDesignItemID, out path, out dbTableName))
path = "";

FindModelLibraryPath​

The method returns the path of the library the model is part of.

string FindModelLibraryPath(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, string argModelName, string argModelType);
string FindModelLibraryPath(int argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, string argModelName, string argModelType);
ParameterTypePassingDescription
argLibIdentifierKindTLibIdentifierKindvalueDenotes which type of library the component is from.
argLibraryIdentifierstringvalueThe library identifier string that the component is associated with.
argDesignItemIDstringvalueThe symbol reference (library reference) of the component from a Schematic or Integrated Library, or a unique part number from a record within a table of a Database.
argModelNamestringvalueThe name of the implementation (model) linked to this component.
argModelTypestringvalueThe model type of the implementation (model) linked to this component.

Returns: string

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

GetAllParametersFromSourceLib​

No description yet.

string GetAllParametersFromSourceLib(string argLibraryPath);
ParameterTypePassing
argLibraryPathstringvalue

Returns: string

GetAvailableDBLibDocAtPath​

No description yet.

IDatabaseLibDocument GetAvailableDBLibDocAtPath(string argLibraryPath);
ParameterTypePassing
argLibraryPathstringvalue

Returns: IDatabaseLibDocument

Extension method of IIntegratedLibraryManagerHelper (using SCH;).

GetCachedFullFilePathFromExplicitFileName​

No description yet.

bool GetCachedFullFilePathFromExplicitFileName(string argRepositoryURL, string argExplicitFileName, ref string argCachedFileName);
ParameterTypePassing
argRepositoryURLstringvalue
argExplicitFileNamestringvalue
argCachedFileNamestringref

Returns: bool

GetComponentCount​

This method retrieves the count of components within the specified integrated library.

int GetComponentCount(string argLibraryPath);
ParameterTypePassingDescription
argLibraryPathstringvalueSpecifies the integrated library.

Returns: int

Example: Show the number of components in the second available library.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
DXP.Utils.ShowMessage(intMan.GetComponentCount(intMan.AvailableLibraryPath(1)).ToString());

Examples: Ciiva, Extension_IntegratedLibraryManager

GetComponentDatafileLocation​

This GetComponentDatafileLocation method obtains the location of the datafile for the component with the specified data file index, model name and its model type, component name and the full library. The result is returned by the method itself or in an output parameter.

string GetComponentDatafileLocation(int argDatafileIndex, string argModelName, string argModelType, string argComponentName, string argComponentLibraryName, ref string argFoundInLibraryPath);
ParameterTypePassingDescription
argDatafileIndexintvalueThe data file index.
argModelNamestringvalueThe model name.
argModelTypestringvalueThe model type.
argComponentNamestringvalueThe component name.
argComponentLibraryNamestringvalueThe full library.
argFoundInLibraryPathstringrefReturns the result, the location of the datafile.

Returns: string

Example: Show where the footprint of a component of an integrated library is found.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
// Placeholders: the library, the component and its footprint.
string libraryPath = "<path of an .IntLib file>";
string componentName = "<component name>";
string footprintName = "<footprint name>";

string foundLocation = "";
intMan.GetComponentDatafileLocation(0, footprintName, "PCBLIB", componentName, libraryPath, ref foundLocation);
DXP.Utils.ShowMessage(foundLocation + " for Component Datafile location");

Examples: Extension_PartComment

GetComponentLocation​

This GetComponentLocation returns the path of the specified component name within the specified library.

string GetComponentLocation(string argLibraryName, string argComponentName, ref string argFoundInLibraryPath);
ParameterTypePassing
argLibraryNamestringvalue
argComponentNamestringvalue
argFoundInLibraryPathstringref

Returns: string

Example: Show where a component of an integrated library is found.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
// Placeholders: the library file name and the component name.
string libraryName = "<library file name>.IntLib";
string componentName = "<component name>";

string foundLocation = "";
intMan.GetComponentLocation(libraryName, componentName, ref foundLocation);
DXP.Utils.ShowMessage(foundLocation
+ "\r"
+ "for "
+ componentName);

Examples: Ciiva, Extension_PartComment

GetComponentLocationFromDatabase​

No description yet.

string GetComponentLocationFromDatabase(string argLibraryName, string argTableName, string argDatabaseKeys, ref string argFoundInLibraryPath);
ParameterTypePassing
argLibraryNamestringvalue
argTableNamestringvalue
argDatabaseKeysstringvalue
argFoundInLibraryPathstringref

Returns: string

GetComponentName​

This method retrieves the name for the indexed component within the specified integrated library. Remember first index is 0.

string GetComponentName(string argLibraryPath, int argComponentIndex);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue

Returns: string

Example: List the names of the components in the second available library.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
string s = "";
string availLibPath = intMan.AvailableLibraryPath(1);
int componentCount = intMan.GetComponentCount(intMan.AvailableLibraryPath(1));
for (int i = 0; i < componentCount; i++)
s = s + " " + intMan.GetComponentName(availLibPath, i);
DXP.Utils.ShowMessage(s);

Examples: Ciiva, Extension_IntegratedLibraryManager

GetComponentPlacementParameters​

No description yet.

string GetComponentPlacementParameters(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID);
string GetComponentPlacementParameters(int argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringvalue
argDesignItemIDstringvalue

Returns: string

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

GetDatabaseDatafileLocation​

No description yet.

string GetDatabaseDatafileLocation(int argDatafileIndex, string argModelName, string argModelType, string argComponentKeys, string argTableName, string argDatabaseLibraryName, ref string argFoundInLibraryPath);
ParameterTypePassing
argDatafileIndexintvalue
argModelNamestringvalue
argModelTypestringvalue
argComponentKeysstringvalue
argTableNamestringvalue
argDatabaseLibraryNamestringvalue
argFoundInLibraryPathstringref

Returns: string

GetDatabaseModelFullLibPath​

No description yet.

string GetDatabaseModelFullLibPath(string argDatabaseLibraryPath, string argLibPath, string argModelName, string argModelType);
ParameterTypePassing
argDatabaseLibraryPathstringvalue
argLibPathstringvalue
argModelNamestringvalue
argModelTypestringvalue

Returns: string

GetDatafileEntityCount​

This method gets datafile entity count for the specified component and its indexed model in the specified library path. Remember first index is 0.

int GetDatafileEntityCount(string argLibraryPath, int argComponentIndex, int argModelIndex);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue
argModelIndexintvalue

Returns: int

GetDatafilePath​

This method gets datafile path for the specified component, its indexed model and its indexed datafile in the specified library path. Remember first index is 0.

string GetDatafilePath(string argLibraryPath, int argComponentIndex, int argModelIndex, int argDatafileIndex);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue
argModelIndexintvalue
argDatafileIndexintvalue

Returns: string

GetFirstLibraryFullPathForLibRef​

No description yet.

string GetFirstLibraryFullPathForLibRef(string argDirectory, string argLibRef, string argExtension);
ParameterTypePassing
argDirectorystringvalue
argLibRefstringvalue
argExtensionstringvalue

Returns: string

GetLifeCycleState​

No description yet.

string GetLifeCycleState(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID);
string GetLifeCycleState(int argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringvalue
argDesignItemIDstringvalue

Returns: string

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

GetModel​

No description yet.

IModel GetModel(string argLibraryPath, int argComponentIndex, int argModelIndex);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue
argModelIndexintvalue

Returns: IModel

Extension method of IIntegratedLibraryManagerHelper (using SCH;).

GetModelCount​

This method retrieves the model count for the indexed component within the specified library. The first indexed component is 0.

int GetModelCount(string argLibraryPath, int argComponentIndex);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue

Returns: int

Example: Show the number of models of the first component in a library.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
string libraryPath = "<path of an .IntLib file>";
DXP.Utils.ShowMessage(intMan.GetModelCount(libraryPath, 0).ToString());

See also: IIntegratedLibraryManager.GetModelName, IIntegratedLibraryManager.GetModelType

GetModelName​

This method retrieves the model name for the indexed component within the specified library. The first indexed component is 0.

string GetModelName(string argLibraryPath, int argComponentIndex, int argModelIndex);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue
argModelIndexintvalue

Returns: string

Example: Show the name of the first model of the first component in a library.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
string libraryPath = "<path of an .IntLib file>";
DXP.Utils.ShowMessage(intMan.GetModelName(libraryPath, 0, 0));

See also: IIntegratedLibraryManager.GetModelCount, IIntegratedLibraryManager.GetModelType

GetModelType​

This method retrieves the model type for the indexed component within the specified library. The first indexed component is 0.

IModelType GetModelType(string argLibraryPath, int argComponentIndex, int argModelIndex);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue
argModelIndexintvalue

Returns: IModelType

Extension method of IIntegratedLibraryManagerHelper (using SCH;).

See also: IModelType, IIntegratedLibraryManager.GetModelName, IIntegratedLibraryManager.GetModelCount

GetOrderedRevisionList​

No description yet.

bool GetOrderedRevisionList(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, out string argCommaTextList);
bool GetOrderedRevisionList(int argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, out string argCommaTextList);
ParameterTypePassing
argLibIdentifierKindTLibIdentifierKindvalue
argLibraryIdentifierstringvalue
argDesignItemIDstringvalue
argCommaTextListstringout

Returns: bool

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

GetParameterCount​

No description yet.

int GetParameterCount(string argLibraryPath, int argComponentIndex);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue

Returns: int

Examples: Ciiva, Extension_IntegratedLibraryManager

GetParameterName​

No description yet.

string GetParameterName(string argLibraryPath, int argComponentIndex, int argParameterIndex);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue
argParameterIndexintvalue

Returns: string

Examples: Ciiva, Extension_IntegratedLibraryManager

GetParametersForDBComponent​

No description yet.

string GetParametersForDBComponent(string argLibraryName, string argTableName, string argDatabaseKeys);
ParameterTypePassing
argLibraryNamestringvalue
argTableNamestringvalue
argDatabaseKeysstringvalue

Returns: string

GetParameterValue​

No description yet.

string GetParameterValue(string argLibraryPath, int argComponentIndex, int argParameterIndex);
ParameterTypePassing
argLibraryPathstringvalue
argComponentIndexintvalue
argParameterIndexintvalue

Returns: string

Examples: Ciiva, Extension_IntegratedLibraryManager

GetSchLibPathForDBComponent​

No description yet.

string GetSchLibPathForDBComponent(string argLibraryPath, string argTableName, string argDatabaseKeys);
ParameterTypePassing
argLibraryPathstringvalue
argTableNamestringvalue
argDatabaseKeysstringvalue

Returns: string

GetSchLibRefForDBComponent​

No description yet.

string GetSchLibRefForDBComponent(string argLibraryPath, string argTableName, string argDatabaseKeys);
ParameterTypePassing
argLibraryPathstringvalue
argTableNamestringvalue
argDatabaseKeysstringvalue

Returns: string

GetWorkingFileNameFromCacheFileName​

No description yet.

string GetWorkingFileNameFromCacheFileName(string argCacheFileName);
ParameterTypePassing
argCacheFileNamestringvalue

Returns: string

InstalledLibraryCount​

This InstalledLibraryCount method reports the number of installed libraries as in the Installed tab of the Available Libraries dialog in Altium Designer.

int InstalledLibraryCount();

Returns: int

See also: IIntegratedLibraryManager.InstalledLibraryPath, IIntegratedLibraryManager.AvailableLibraryPath, IIntegratedLibraryManager.AvailableLibraryCount

Examples: Extension_IntegratedLibraryManager

InstalledLibraryPath​

This InstalledLibraryPath method retrieves the path of the indexed installed library in Altium Designer. An installed library appears in the installed libraries list box in the Installed tab of the Available Libraries dialog.

string InstalledLibraryPath(int argnIndex);
ParameterTypePassing
argnIndexintvalue

Returns: string

Example: Uninstall every installed library and keep a list of their paths.

using System.Collections.Generic;
using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
var originalInstalledList = new List<string>();
for (int i = 0; i < intMan.InstalledLibraryCount(); i++)
originalInstalledList.Add(intMan.InstalledLibraryPath(i));
// Uninstall after collecting the paths: uninstalling changes the indexes of the remaining libraries.
foreach (string path in originalInstalledList)
intMan.UninstallLibrary(path);
// do what you want with the originalInstalledList

Examples: Extension_IntegratedLibraryManager

InstallLibrary​

This method installs the library (full path) in the Available Libraries dialog (in the Installed page) in Altium Designer.

void InstallLibrary(string argLibraryPath);
ParameterTypePassing
argLibraryPathstringvalue

Returns: nothing (void)

Example: Install an integrated library.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
intMan.InstallLibrary("<path of an .IntLib file>");

IsParameterDatabaseKey​

No description yet.

bool IsParameterDatabaseKey(string argLibraryPath, string argDatabaseTableName, string argParameterName);
ParameterTypePassing
argLibraryPathstringvalue
argDatabaseTableNamestringvalue
argParameterNamestringvalue

Returns: bool

MakeCurrentProject​

This method makes the current library in the Libraries panel based on the project.

void MakeCurrentProject(IProject argProject);
void MakeCurrentProject(object argProject);
ParameterTypePassing
argProjectIProjectvalue

Returns: nothing (void)

The first overload is an extension method of IIntegratedLibraryManagerHelper (using SCH;) with typed parameters; the second is declared by the interface.

Example: Compile the focused library package into an integrated library and make it the current project.

using System.IO;
using DXP;
using EDP;
using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
var wsm = DXP.GlobalVars.Client.GetDXPWorkspace() as EDP.IWorkspace;
if (wsm == null)
return;
IProject project = wsm.DM_FocusedProject();
if (project == null)
return;
string libPath = Path.ChangeExtension(project.DM_ProjectFullPath(), ".INTLIB");
intMan.CreateIntegratedLibrary(project, libPath, true);
intMan.MakeCurrentProject(project);

ModelCount​

This ModelCount method returns the number of models of the same type associated with the component within the specified library.

int ModelCount(string argComponentName, string argComponentLibraryName, string argModelType);
ParameterTypePassingDescription
argComponentNamestringvalueThe name of the component.
argComponentLibraryNamestringvalueThe full path of the library the component is from.
argModelTypestringvalueThe model type whose models are counted.

Returns: int

ModelName​

This ModelName method returns the name of the model type associated with the component within a specified library.

string ModelName(string argComponentName, string argComponentLibraryName, string argModelType, int argnIndex);
ParameterTypePassing
argComponentNamestringvalue
argComponentLibraryNamestringvalue
argModelTypestringvalue
argnIndexintvalue

Returns: string

Example: List the footprint models of a component in an integrated library.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
// Placeholders: the library and the component.
string libraryPath = "<path of an .IntLib file>";
string componentName = "<component name>";

int modelCount = intMan.ModelCount(componentName, libraryPath, "PCBLIB");
DXP.Utils.ShowMessage(componentName + "'s ModelCount : " + modelCount);
string s = "";
for (int i = 0; i < modelCount; i++)
s = s + "\r" + intMan.ModelName(componentName, libraryPath, "PCBLIB", i);
DXP.Utils.ShowMessage(s);

ParseDatabaseKeys​

No description yet.

string ParseDatabaseKeys(string argKeys, string argDelimiter);
ParameterTypePassing
argKeysstringvalue
argDelimiterstringvalue

Returns: string

PlaceLibraryComponent​

This method places a component from a specified library with Library Reference and Parameters that describe/define this component.

bool PlaceLibraryComponent(string argLibReference, string argLibraryPath, string argParameters);
ParameterTypePassingDescription
argLibReferencestringvalueDefines the component. For example 'Res2'.
argLibraryPathstringvalueThe path to the library that the component is from. For example 'Miscellaneous Devices.IntLib'.
argParametersstringvalueThe parameters needed for the component to be able to be placed on the schematic sheet. For example 'ModelType=SIM|ModelParameterName0=Value|ModelParameterValue0=1K|Orientation=1|Location.X=10000000|Location.Y=20000000'. Normally you will need Location.X and Location.Y parameters at the least to be able to place this component on the schematic sheet.

Returns: bool

Example: Place a resistor from an integrated library on the current schematic sheet.

using SCH;

ISch_ServerInterface schServer = SCH.GlobalVars.SchServer;
if (schServer == null)
return;
if (schServer.GetCurrentSchDocument() == null)
return;
IIntegratedLibraryManager integratedLibraryManager = EDP.Utils.LoadIntegratedLibraryManager();
if (integratedLibraryManager == null)
return;
// Integrated Library object model is used to place a
// component from the library onto the schematic sheet.
integratedLibraryManager.PlaceLibraryComponent(
"Res2",
"Miscellaneous Devices.IntLib",
"ModelType=SIM|ModelParameterName0=Value|" +
"ModelParameterValue0=1K|Orientation=1|Location.X=10000000|Location.Y=20000000");
// Refresh screen
schServer.GetCurrentSchDocument().GraphicallyInvalidate();

UninstallLibrary​

This method removes the specified library (full path) in the Available Libraries dialog (in the Installed page) in Altium Designer

void UninstallLibrary(string argLibraryPath);
ParameterTypePassing
argLibraryPathstringvalue

Returns: nothing (void)

Example: Uninstall an integrated library.

using SCH;

IIntegratedLibraryManager intMan = EDP.Utils.LoadIntegratedLibraryManager();
if (intMan == null)
return;
intMan.UninstallLibrary("<path of an .IntLib file>");

See also: IIntegratedLibraryManager.InstallLibrary

UpdateCachedFileIfNecessary​

No description yet.

void UpdateCachedFileIfNecessary(string argCachedLibraryPath);
ParameterTypePassing
argCachedLibraryPathstringvalue

Returns: nothing (void)

Returned by​

Utils.LoadIntegratedLibraryManager

Examples​

Used in the SDK examples: Ciiva, Extension_IntegratedLibraryManager, Extension_PartComment, Extension_TestCS.