Esempio n. 1
0
def main():
	"""
	da main
	"""
	global data
	global block
	global commlst
	global commdct
	global objlst_dct
	showlicense()
	print 'It is a little slow here parsing data from the Energy.idd file'
	print 'Please wait .... '
	dictfile=fileloc+'Energy+V6_0.idd'
	
	block,commlst,commdct=parse_idd.extractidddata(dictfile)
	objlst_dct=parse_idd.getobjectref(block,commdct)
	tmp=raw_input('hit RETURN to continue')

	fname1=tuiopenfile()
	if fname1==-1:return

	
	theidd=eplusdata.idd(block,2)
	data=eplusdata.eplusdata(theidd,fname1)
		
	allobjects()
	global dirty
	if dirty:
		#save the file
		tuisavefile(fname1)
Esempio n. 2
0
def readdatacommdct1(idfname, iddfile="Energy+.idd", commdct=None, block=None):
    """read the idf file"""
    if not commdct:
        block, commlst, commdct = parse_idd.extractidddata(iddfile)
        theidd = eplusdata.idd(block, 2)
    else:
        theidd = eplusdata.idd(block, 2)
    data = eplusdata.eplusdata(theidd, idfname)
    return block, data, commdct
Esempio n. 3
0
def readdatacommlst(idfname):
    """read the idf file"""
    # iddfile = sys.path[0] + '/EplusCode/Energy+.idd'
    iddfile = "Energy+.idd"
    # iddfile = './EPlusInterfaceFunctions/E1.idd' # TODO : can the path name be not hard coded
    iddtxt = open(iddfile, "r").read()
    block, commlst, commdct = parse_idd.extractidddata(iddfile)

    theidd = eplusdata.idd(block, 2)
    data = eplusdata.eplusdata(theidd, idfname)
    return data, commlst