summaryrefslogtreecommitdiff
path: root/src/projManagement
diff options
context:
space:
mode:
authorSumanto Kar2023-09-02 15:06:23 +0530
committerGitHub2023-09-02 15:06:23 +0530
commit9dfa8fc60df73549735d7347e1bfbe356a27edf5 (patch)
treecf7cb7dd966e48f432ee44134d39817f8bf81d60 /src/projManagement
parentddffb22e52db5e3ebc61262b1ae5e8a6d6e770df (diff)
parent7c92529d1576015d39a9fecfd85ae918baf3e62e (diff)
downloadeSim-9dfa8fc60df73549735d7347e1bfbe356a27edf5.tar.gz
eSim-9dfa8fc60df73549735d7347e1bfbe356a27edf5.tar.bz2
eSim-9dfa8fc60df73549735d7347e1bfbe356a27edf5.zip
Merge pull request #255 from PSR0001/master
Porting KiCad V4 To V6
Diffstat (limited to 'src/projManagement')
-rw-r--r--src/projManagement/Kicad.py16
-rw-r--r--src/projManagement/newProject.py3
2 files changed, 12 insertions, 7 deletions
diff --git a/src/projManagement/Kicad.py b/src/projManagement/Kicad.py
index 8c92c06b..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,14 +79,18 @@ 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
- self.cmd = "eeschema " + self.project + ".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 278cfbe3..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 + ".sch\n")
+ # New KiCad v6 file extension
+ f.write("schematicFile " + self.projName + ".kicad_sch\n")
f.close()
# Now Change the current working project