ILibCompInfoReader interface
The ILibCompInfoReader interface represents the object which has the list of library components (symbols) of a loaded schematic library.
public interface ILibCompInfoReader
Namespace: SCH · Assembly: Altium.SDK.Interfaces
Derived: ILibCompFullInfoReader
Remarks
A Schematic library file with a SchLib extension can be loaded in the object represented by the ILibCompInfoReader interface and to obtain each component (Symbol), invoke the indexed ComponentInfos method. This method fetches the object which is represented by the IComponentInfo interface.
The steps required to load a schematic library and its components.
-
Create an object and pass in the filename of a schematic library file. This object is represented by the
ILibCompInfoReaderinterface. This object is created byISch_ServerInterface.CreateLibCompInfoReader. -
Invoke the
ILibCompInfoReader.ReadAllComponentInfomethod to load the components specified by the library name. -
Invoke the
ILibCompInfoReader.NumComponentInfosmethod to obtain the number of components for this library -
Obtain the indexed ComponentInfos method. This ComponentInfos method returns the indexed
IComponentInfointerface.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| ComponentInfo | IComponentInfo | get | This ComponentInfos property retrieves the indexed IComponentInfo data structure. |
| FileName | string | get | This FileName property gets the temporary filename of the datastructure. |
ComponentInfo
This ComponentInfos property retrieves the indexed IComponentInfo data structure. The ComponentInfo interface contains information such as component name, alias name, part count and offset for the indexed schematic symbol (component) in the library.
IComponentInfo GetState_ComponentInfo(int argI);
Type: IComponentInfo · Access: read-only · Index: argI (int)
The accessors are extension methods of ILibCompInfoReaderHelper (using SCH;).
See also: IComponentInfo
FileName
This FileName property gets the temporary filename of the datastructure.
string GetState_FileName();
Type: string · Access: read-only
See also: IComponentInfo
Methods
| Method | Returns | Description |
|---|---|---|
| NumComponentInfos | int | This NumComponentInfos method retrieves the number of component information data structures. |
| ReadAllComponentInfo | void | The ReadAllComponentInfo retrieves all the IComponentInfo data structures for the ILibCompInfoReader interface. |
NumComponentInfos
This NumComponentInfos method retrieves the number of component information data structures. This method is also used by the ComponentInfos property. The ComponentInfo interface contains information such as component name, alias name, part count and offset for the indexed schematic symbol (component) in the library.
int NumComponentInfos();
Returns: int
ReadAllComponentInfo
The ReadAllComponentInfo retrieves all the IComponentInfo data structures for the ILibCompInfoReader interface. The ComponentInfo interface contains information such as component name, alias name, part count and offset for the indexed schematic symbol (component) in the library.
void ReadAllComponentInfo();
Returns: nothing (void)
Returned by
ISch_ServerInterface.CreateLibCompInfoReader