load a Bui file, update the thickness of the insulation material in EXT_WALL and save it.
from b18 import BuiFile
if __name__ == '__main__':
bui = BuiFile('Building.b18')
# Search 'EXT_WALL'
wall = next( (con for con in bui.constructions if con.name=='EXT_WALL') ,None)
if(wall != None):
wall.thickness = 0.2 #Thickness for 'DAEMA'
Generated by Unit : Not applicable or not available
Generated by Type : 169
TRNSYS Message 105 : A TYPE was called in the TRNSYS input file but was either not linked into trndll.dll or was not found in an external dll. A dummy subroutine was called in its place. Please link the TYPE or remove it from the input file
Reported information : Type169 could not be located in either the trndll.dll or in an external dll. Please relink theTRNDll.dll including this Type or make sure that an external DLL in the UserLibDebugDLLs and UserLibReleaseDLLs folders contain the Type.
import TRNSYSpy as trn
# retrieve values from the Inputs
inp1 = trn.getInputValue(1)
inp2 = trn.getInputValue(2)
inp3 = trn.getInputValue(3)
out1 = inp1+inp2
out2 = inp3**inp2
# return the new values to the Outputs
"""This function is called from TRNSYS/Type169"""
# delete the previous log file if it exists.
logfile = "_error.log"
# save messages to the log file when something goes wrong.
with open(logfile, 'w') as f: