summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice/Processing.py
diff options
context:
space:
mode:
authorfahim2015-04-16 15:48:58 +0530
committerfahim2015-04-16 15:48:58 +0530
commit087cb76412136e4050770d8099aa5f5431afa233 (patch)
tree9d7e9330b1d513d238536bc6b451b37cbf2304ea /src/kicadtoNgspice/Processing.py
parent15564f65ee11f442748705c9adeceed354b3d45c (diff)
downloadeSim-087cb76412136e4050770d8099aa5f5431afa233.tar.gz
eSim-087cb76412136e4050770d8099aa5f5431afa233.tar.bz2
eSim-087cb76412136e4050770d8099aa5f5431afa233.zip
Subject: added Model Widget functionality
Description: Completed the 80% part of Kicad to Ngspice conversion
Diffstat (limited to 'src/kicadtoNgspice/Processing.py')
-rw-r--r--src/kicadtoNgspice/Processing.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/kicadtoNgspice/Processing.py b/src/kicadtoNgspice/Processing.py
index ce19877f..63f38bb2 100644
--- a/src/kicadtoNgspice/Processing.py
+++ b/src/kicadtoNgspice/Processing.py
@@ -264,7 +264,23 @@ class PrcocessNetlist:
for item in param:
#print "Tags ",item.tag
#print "Value",item.text
- paramDict[item.tag] = item.text
+ if 'vector'in item.attrib:
+ print "Tag having vector attribute",item.tag,item.attrib['vector']
+ temp_count = 1
+ temp_list = []
+ for i in range(0,int(item.attrib['vector'])):
+ temp_list.append(item.text+" "+str(temp_count))
+ temp_count += 1
+ if 'default' in item.attrib:
+ paramDict[item.tag+":"+item.attrib['default']] = temp_list
+ else:
+ paramDict[item.tag] = item.text
+
+ else:
+ if 'default' in item.attrib:
+ paramDict[item.tag+":"+item.attrib['default']] = item.text
+ else:
+ paramDict[item.tag] = item.text
print "Number of Nodes : ",num_of_nodes