From 697ff38a5712f97a4ca5b81731d4bd3bf0bc69f6 Mon Sep 17 00:00:00 2001 From: fahim-oscad Date: Mon, 21 Mar 2016 14:12:08 +0530 Subject: Removing Lower case functionality for Reference Model Name --- src/ngspicetoModelica/NgspicetoModelica.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py index 74401c9b..582e8796 100644 --- a/src/ngspicetoModelica/NgspicetoModelica.py +++ b/src/ngspicetoModelica/NgspicetoModelica.py @@ -97,9 +97,11 @@ class NgMoConverter: print filename + " does not exist" sys.exit() data = f.read() - #data = data.lower() #No need to make it lower case - newdata = data.split('(') + #data = data.lower() #Won't work if Reference model name is Upper Case + newdata = data.split('(') + #First fetch the refModelName and then lower case its parameter refModelName = newdata[0].split()[1] + newdata[1] = newdata[1].lower() modelParameter = newdata[1].split() modelInfo[refModelName] = {} @@ -255,7 +257,7 @@ class NgMoConverter: elif eachline[0] == 'd': if len(words) > 3: print words[3] - print "ModelInfo",modelInfo + print "ModelInfo----------->",modelInfo n = float(modelInfo[words[3]]['n']) vt_temp = 0.025*n vt = str(vt_temp) -- cgit