a static class to handel all components More...
| component * | findComponent(string name,string lib="") |
| component * | newComponent(string name="New Component", string lib="") |
| void | addLib(string filename) |
| void | removeLib(string filename) |
| stringList | getLibs() |
| stringList | getOaLibs() |
| stringList | getOaCellNames( string lib) |
| stringList | getComponents(string lib) |
| string | getFilename(string lib) |
| string | getPath(string lib) |
components is the static catalogue of every library device known to the Schematic Editor. You never construct it; call components::findComponent or components::newComponent with a name and an optional library. addLib opens a library file; use the extension .oa for an OpenAccess library, in which case no path is required. getLibs lists the libraries that are actually shown in the component panel; getOaLibs lists every library registered in the OpenAccess libs.def file, whether or not it is displayed. getComponents lists the device names in one library. OpenAccess and the built-in libraries have no ordinary file path, so getFilename and getPath cannot be used on them. In Python the same members are called on the class, for example components.findComponent("nmos", "analog").
Example:
components::addLib("/home/user/mylib.lel");
component *c = components::findComponent("nmos", "analog");
if (c == NULL)
c = components::newComponent("nmos", "analog");
stringList libs = components::getLibs();
stringList names = components::getComponents("analog");
Looks up a component by name. If lib is not empty, only that library is searched.
Returns: the component, or NULL if the name is unknown.
| Parameter: | |
|---|---|
| name | name |
| lib | lib |
Creates a new component named name in library lib.
Returns: a pointer to the new component.
| Parameter: | |
|---|---|
| name | name |
| lib | lib |
Adds filename to the used libraries. Use the extension .oa to name an OpenAccess library; in that case no path is required.
Removes filename from the used libraries.
Returns: a stringList of the libraries shown in the Schematic Editor. Only the core library name is returned. Use getPath for the full path of a file-based library.
Returns: a stringList of all libraries registered in the OpenAccess libs.def file. A library from that list is shown in the component panel only after addLib with the name plus the extension .oa. This function returns the names without that extension. (introduced with releases 20201230)
Returns: a stringList of all cells in OpenAccess library lib. If lib is not a valid OpenAccess library, the list is empty. (introduced with releases 20210102)
Returns: a stringList of all component names in lib.
Returns: the absolute file name of library lib. This cannot be used for OpenAccess or built-in libraries.
Returns: the absolute directory of library lib. This cannot be used for OpenAccess or built-in libraries.