From a802f8b1d403f342c0eafe5b6989f6cd22224297 Mon Sep 17 00:00:00 2001
From: Fahim
Date: Thu, 15 Oct 2015 15:11:13 +0530
Subject: Changes code and added file for 32 & 64 bit of pspice to Kicad
converter
---
src/pspicetoKicad/ImportPspice.py | 77 ++++++++++++++++++++++++++++++++++++++
src/pspicetoKicad/__init__.py | 0
src/pspicetoKicad/libConverter32 | Bin 0 -> 207558 bytes
src/pspicetoKicad/libConverter64 | Bin 0 -> 235924 bytes
src/pspicetoKicad/schConverter32 | Bin 0 -> 234915 bytes
src/pspicetoKicad/schConverter64 | Bin 0 -> 264411 bytes
6 files changed, 77 insertions(+)
create mode 100644 src/pspicetoKicad/ImportPspice.py
create mode 100644 src/pspicetoKicad/__init__.py
create mode 100755 src/pspicetoKicad/libConverter32
create mode 100755 src/pspicetoKicad/libConverter64
create mode 100755 src/pspicetoKicad/schConverter32
create mode 100755 src/pspicetoKicad/schConverter64
diff --git a/src/pspicetoKicad/ImportPspice.py b/src/pspicetoKicad/ImportPspice.py
new file mode 100644
index 00000000..3134601d
--- /dev/null
+++ b/src/pspicetoKicad/ImportPspice.py
@@ -0,0 +1,77 @@
+from PyQt4 import QtGui,QtCore
+from configuration.Appconfig import Appconfig
+import os
+import platform
+
+class ImportPspiceLibrary(QtGui.QWidget):
+ """
+ This is used to import the Pspice Library and convert it inot Kicad library
+ """
+ def __init__(self):
+ super(ImportPspiceLibrary, self).__init__()
+ self.obj_Appconfig = Appconfig()
+
+ def imortLib(self):
+ self.home = os.path.expanduser("~")
+ self.libLocation = QtGui.QFileDialog.getOpenFileName(self,"open",self.home)
+ self.obj_Appconfig.print_info('File selected : '+self.libLocation)
+
+ #Create command to run
+ self.cmd = "../pspicetoKicad/libConverter "+self.libLocation
+ os.system(str(self.cmd))
+
+
+
+class ConvertPspiceKicad(QtGui.QWidget):
+ """
+ This is used to convert Pspice schematic into Kicad schematic
+ """
+ def __init__(self):
+ super(ConvertPspiceKicad, self).__init__()
+ self.obj_Appconfig = Appconfig()
+
+ def runConverter(self):
+ self.obj_Appconfig.print_info('Running PSPICE to Kicad converter')
+ self.home = os.path.expanduser("~")
+ self.pspiceSchFileLoc = QtGui.QFileDialog.getOpenFileName(self,"open",self.home)
+ self.pspiceSchFileName = os.path.basename(str(self.pspiceSchFileLoc))
+ self.worspace_loc = self.obj_Appconfig.default_workspace['workspace']
+ self.outputDir = os.path.join(self.worspace_loc,self.pspiceSchFileName)
+
+ #Create command to be run
+ if platform.system() == 'Linux':
+ #Check for 32 or 64 bit
+ if platform.architecture()[0] == '64bit':
+ self.cmd = "../pspicetoKicad/schConverter64 "+self.pspiceSchFileLoc+" "+self.outputDir
+ else:
+ self.cmd = "../pspicetoKicad/schConverter32 "+self.pspiceSchFileLoc+" "+self.outputDir
+
+ elif platform.system() == 'Windows':
+ print "Needs to include for Windows"
+
+ #Running command
+ self.status = os.system(str(self.cmd))
+
+
+ if self.status == 0:
+ self.msg = QtGui.QMessageBox()
+ self.msgContent = "Successfully converted PSPICE schematic to Kicad Schematic.
\
+ Project is available in eSim workspace at "+self.outputDir+".
\
+ You can open the project from eSim workspace"
+ self.msg.setTextFormat(QtCore.Qt.RichText)
+ self.msg.setText(self.msgContent)
+ self.msg.setWindowTitle("Message")
+ self.obj_Appconfig.print_info(self.msgContent)
+ self.msg.exec_()
+
+ else:
+ self.msg = QtGui.QErrorMessage(None)
+ self.msg.showMessage('Error while converting PSPICE schematic to Kicad Schematic')
+ self.obj_Appconfig.print_error('Error while converting PSPICE schematic to Kicad Schematic')
+ self.msg.setWindowTitle("Error Message")
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pspicetoKicad/__init__.py b/src/pspicetoKicad/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/src/pspicetoKicad/libConverter32 b/src/pspicetoKicad/libConverter32
new file mode 100755
index 00000000..d0643cca
Binary files /dev/null and b/src/pspicetoKicad/libConverter32 differ
diff --git a/src/pspicetoKicad/libConverter64 b/src/pspicetoKicad/libConverter64
new file mode 100755
index 00000000..564a8f16
Binary files /dev/null and b/src/pspicetoKicad/libConverter64 differ
diff --git a/src/pspicetoKicad/schConverter32 b/src/pspicetoKicad/schConverter32
new file mode 100755
index 00000000..d217cc4c
Binary files /dev/null and b/src/pspicetoKicad/schConverter32 differ
diff --git a/src/pspicetoKicad/schConverter64 b/src/pspicetoKicad/schConverter64
new file mode 100755
index 00000000..3413a4fc
Binary files /dev/null and b/src/pspicetoKicad/schConverter64 differ
--
cgit