diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pspicetoKicad/ImportPspice.py | 77 | ||||
-rw-r--r-- | src/pspicetoKicad/__init__.py | 0 | ||||
-rwxr-xr-x | src/pspicetoKicad/libConverter32 | bin | 0 -> 207558 bytes | |||
-rwxr-xr-x | src/pspicetoKicad/libConverter64 | bin | 0 -> 235924 bytes | |||
-rwxr-xr-x | src/pspicetoKicad/schConverter32 | bin | 0 -> 234915 bytes | |||
-rwxr-xr-x | src/pspicetoKicad/schConverter64 | bin | 0 -> 264411 bytes |
6 files changed, 77 insertions, 0 deletions
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.<br/>\ + Project is available in eSim workspace at <b>"+self.outputDir+"</b>.<br\>\ + 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 --- /dev/null +++ b/src/pspicetoKicad/__init__.py diff --git a/src/pspicetoKicad/libConverter32 b/src/pspicetoKicad/libConverter32 Binary files differnew file mode 100755 index 00000000..d0643cca --- /dev/null +++ b/src/pspicetoKicad/libConverter32 diff --git a/src/pspicetoKicad/libConverter64 b/src/pspicetoKicad/libConverter64 Binary files differnew file mode 100755 index 00000000..564a8f16 --- /dev/null +++ b/src/pspicetoKicad/libConverter64 diff --git a/src/pspicetoKicad/schConverter32 b/src/pspicetoKicad/schConverter32 Binary files differnew file mode 100755 index 00000000..d217cc4c --- /dev/null +++ b/src/pspicetoKicad/schConverter32 diff --git a/src/pspicetoKicad/schConverter64 b/src/pspicetoKicad/schConverter64 Binary files differnew file mode 100755 index 00000000..3413a4fc --- /dev/null +++ b/src/pspicetoKicad/schConverter64 |