diff options
author | rahulp13 | 2023-06-29 19:33:02 +0530 |
---|---|---|
committer | rahulp13 | 2023-06-29 19:38:37 +0530 |
commit | 6fb36b7f770ecf81e2abd8b8b5d86a1b75e497c5 (patch) | |
tree | 02d1b572a37e9de893b7be888515c5d998de6914 /src/projManagement | |
parent | 46ae72336513017b3c694876c1954cbaa760bfde (diff) | |
download | eSim-6fb36b7f770ecf81e2abd8b8b5d86a1b75e497c5.tar.gz eSim-6fb36b7f770ecf81e2abd8b8b5d86a1b75e497c5.tar.bz2 eSim-6fb36b7f770ecf81e2abd8b8b5d86a1b75e497c5.zip |
refactored naming conventions with kicad6
Diffstat (limited to 'src/projManagement')
-rw-r--r-- | src/projManagement/Kicad.py | 20 | ||||
-rw-r--r-- | src/projManagement/newProject.py | 3 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/projManagement/Kicad.py b/src/projManagement/Kicad.py index 16569d80..833f075e 100644 --- a/src/projManagement/Kicad.py +++ b/src/projManagement/Kicad.py @@ -10,10 +10,10 @@ # BUGS: --- # NOTES: --- # AUTHOR: Fahim Khan, fahim.elex@gmail.com -# MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in +# MODIFIED: Rahul Paknikar, Partha Singh Roy # ORGANIZATION: eSim Team at FOSSEE, IIT Bombay # CREATED: Tuesday 17 February 2015 -# REVISION: Sunday 26 July 2020 +# REVISION: Thursday 29 Jun 2023 # ========================================================================= import os @@ -25,7 +25,7 @@ from PyQt5 import QtWidgets class Kicad: """ - This class called the Kicad Schematic,KicadtoNgspice Converter,Layout + This class called the Kicad Schematic, KicadtoNgspice Converter, Layout editor and Footprint Editor Initialise validation, appconfig and dockarea @@ -79,19 +79,17 @@ class Kicad: 'Kicad Schematic is called for project ' + self.projDir) except BaseException: pass - # Validating if current project is available or not + # Validating if current project is available or not if self.obj_validation.validateKicad(self.projDir): self.projName = os.path.basename(self.projDir) self.project = os.path.join(self.projDir, self.projName) - # Creating a command to run - if os.path.exists(self.project + ".kicad_sch"): - self.cmd = "eeschema " + self.project + ".kicad_sch" #kicad v6 file - elif os.path.exists(self.project + ".sch"): - self.cmd = "eeschema " + self.project + ".sch" #kicad v4 file - else: - self.cmd = "eeschema " + self.project + ".kicad_sch" + # creating a command to open schematic + self.cmd = "eeschema " + self.project + ".kicad_sch" # kicad6 file + if not os.path.exists(self.project + ".kicad_sch") \ + and os.path.exists(self.project + ".sch"): + self.cmd = "eeschema " + self.project + ".sch" # kicad4 file self.obj_workThread.args = self.cmd self.obj_workThread.start() diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py index 8b305964..10fb0cb5 100644 --- a/src/projManagement/newProject.py +++ b/src/projManagement/newProject.py @@ -94,7 +94,8 @@ class NewProjectInfo(QtWidgets.QWidget): ) self.msg.exec_() - f.write("schematicFile " + self.projName + ".kicad_sch\n") #New KiCad V6 file extension + # New KiCad v6 file extension + f.write("schematicFile " + self.projName + ".kicad_sch\n") f.close() # Now Change the current working project |