Construct a symbol library (system symbols, optionally overlaid by a schematic's frozen .symbols) without publishing it as the active library. Pass overlay_path=None to get the live, un-frozen definitions.
(self, overlay_path=None)
| 540 | self._scene.start_placement(name, svg) |
| 541 | |
| 542 | def _make_library(self, overlay_path=None) -> SymbolLibrary: |
| 543 | """Construct a symbol library (system symbols, optionally overlaid by a |
| 544 | schematic's frozen <name>.symbols) without publishing it as the active |
| 545 | library. Pass overlay_path=None to get the live, un-frozen definitions.""" |
| 546 | lib = SymbolLibrary(_SYMBOLS_SVG) |
| 547 | if self._config == "full": |
| 548 | # Load all additional SVGs from the system symbols directory. |
| 549 | lib.add_user_library(_SYMBOLS_DIR, exclude_stems={"Symbols"}) |
| 550 | # User symbol libraries in the project's lib/ (always loaded regardless |
| 551 | # of config); generated block symbols are excluded — they load on placement. |
| 552 | libdir = project.subdir("lib") |
| 553 | lib.add_user_library(libdir, exclude_stems={p.stem for p in libdir.glob("*.lib")}) |
| 554 | if overlay_path is not None: |
| 555 | lib.add_bundle(overlay_path) |
| 556 | return lib |
| 557 | |
| 558 | def _build_library(self, overlay_path=None): |
| 559 | """(Re)build the active symbol library: system symbols, optionally |
no test coverage detected