MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _default_export_path

Method _default_export_path

SLiCAP/schematic/window.py:829–835  ·  view source on GitHub ↗

Default save path for an export: in *subdir*. Mirrors the .slicap_sch base name so exporting design.slicap_sch proposes design.cir / design.svg / design.pdf.

(self, subdir: str, ext: str)

Source from the content-addressed store, hash-verified

827 self._dirty = True # style is part of the schematic now
828
829 def _default_export_path(self, subdir: str, ext: str) -> str:
830 """Default save path for an export: <schematic stem><ext> in *subdir*.
831
832 Mirrors the .slicap_sch base name so exporting design.slicap_sch
833 proposes design.cir / design.svg / design.pdf."""
834 stem = self._current_path.stem if self._current_path else "schematic"
835 return str(project.subdir(subdir) / f"{stem}{ext}")
836
837 def _on_export_svg(self):
838 path, _ = QFileDialog.getSaveFileName(

Callers 3

_on_export_svgMethod · 0.95
_on_export_pdfMethod · 0.95
_on_export_netlistMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected