MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / makeCircuit

Function makeCircuit

SLiCAP/SLiCAPshell.py:282–376  ·  view source on GitHub ↗

#. Creates and returns a circuit object from: - A netlist file (".cir" file: always in the cir folder of the project folder) - A KiCAD schematic file (".kicad_sch" file, full path or relative to project folder) - An LTspice schematic file (".asc"

(fileName, cirTitle=None, imgWidth=500, 
                 expansion=True, description=None, language="SLiCAP")

Source from the content-addressed store, hash-verified

280 return netlist, subckt
281
282def makeCircuit(fileName, cirTitle=None, imgWidth=500,
283 expansion=True, description=None, language="SLiCAP"):
284 """
285 #. Creates and returns a circuit object from:
286
287 - A netlist file (".cir" file: always in the cir folder of the project
288 folder)
289 - A KiCAD schematic file (".kicad_sch" file, full path or relative to
290 project folder)
291 - An LTspice schematic file (".asc" file, full path or relative to
292 project folder)
293 - A Lepton-eda schematic file (".sch" file, full path or relative to
294 project folder; Linux and macOS only)
295 - A gschem schematic file (".sch" file, full path or relative to script;
296 MSWindows only)
297
298 #. Creates drawing size PDF and SVG image files of the schematics diagram
299 (KiCAD and Lepton-eda only, KiCAD requires installation of Inkscape) and
300 puts these images in the ini.img_path folder.
301
302 #. Creates an HTML page with circuit information.
303
304 ----
305
306 :param fileName: Circuit file name, netlist files ".cir" are located in the
307 ini.cir directory, which can be altered in the SLiCAP.ini
308 file in the project directory.
309
310 Schematic files from KiCAD, LTspice, Lepton-eda or gschem
311 should be given with their path relative to the project
312 folder or with their absolute path.
313 :type fileName: str
314
315 :param cirTitle: Title of the circuit if no title is given for netlist generation:
316
317 - KiCAD: uses Title field on schematic or the filename
318 without ".kicad_sch"
319 - LTspice, gschem, lepton-eda use the filename without
320 extension ".asc" or ".sch".
321
322 Defaults to None
323
324 :type cirTitle: str
325
326 :param imgWidth: - Width of the circuit image in pixels (for placement on
327 the HTML page with circuit data)
328 - None: No image file will be placed on the HTML page with
329 circuit data
330
331 Defaults to 500
332
333 :type imgWidth: int, None
334
335 :param expansion: - True: expanded netlist and parameter definitions are
336 shown on the "Circuit Data" HTML page
337 - False: only the circuit image and the circuit netlist
338 are shown on the "Circuit Data" HTML page
339

Callers

nothing calls this directly

Calls 10

_checkCircuitFunction · 0.90
htmlPageFunction · 0.90
head2htmlFunction · 0.90
file2htmlFunction · 0.90
img2htmlFunction · 0.90
netlist2htmlFunction · 0.90
elementData2htmlFunction · 0.90
params2htmlFunction · 0.90
_makeNetlistFunction · 0.85
formatMethod · 0.80

Tested by

no test coverage detected