Skip to content

Commit

Permalink
minor fix in setMSXTimeStep
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariosmsk committed Jun 20, 2024
1 parent 3859be9 commit 0df4cc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion epyt/epanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -12389,7 +12389,10 @@ def getMSXSourceNodeNameID(self):
return nodes

def changeMSXOptions(self, param, change):
with open(self.msxname, 'r+') as f:
options_section = 'options_section.msx'
self.saveMSXFile(options_section)

with open(options_section, 'r+') as f:
lines = f.readlines()
options_index = -1 # Default to -1 in case the [OPTIONS] section does not exist
flag = 0
Expand All @@ -12404,7 +12407,9 @@ def changeMSXOptions(self, param, change):
f.seek(0)
f.writelines(lines)
f.truncate()

self.msx.MSXclose()
copyfile(options_section, self.msxname)
self.msx.MSXopen(self.msxname, reload = True)

def setMSXAreaUnitsCM2(self):
Expand Down
Binary file added sdl8_5
Binary file not shown.

0 comments on commit 0df4cc8

Please sign in to comment.