David
What you advise is what I did:
arg1 = directory where TRNSYS.exe is
arg2 = name of the DCK file
arg3 = "/h" (to avoid that window open the interface)
exe_trnsys = subprocess.call([arg1,arg2,arg3])
but it is very slow. A better way will be to have a .dll
best regards
De : David BRADLEY <d.bradley@tess-inc.com>
Envoyé : vendredi 3 juillet 2020 17:39 À : TRNSYS users mailing list at OneBuilding.org <trnsys-users@lists.onebuilding.org> Cc : Maurice Charbit - OZE-ENERGIES <mch@oze-energies.com> Objet : Re: [TRNSYS-users] ddl or api for trnsys.exe Maurice, I have not used Python, however, TRNSYS can be called from the command line so I assume it would be able to be called from Python as well. The command line to run one of the TRNSYS examples is:
c:\Trnsys18\Exe\TRNExe64.exe "c:\Trnsys18\Examples\Calling_Contam\CombinedThermalAirflow_AHU.dck"
if you add a /n at the end of the line then there will be no need to click "ok" when the run completes. if you add a /h at the end of the line then TRNSYS will run entirely in the background.
kind regards, David
On 07/03/2020 09:45, Maurice Charbit - OZE-ENERGIES via TRNSYS-users wrote:
-- *************************** David BRADLEY Principal Thermal Energy Systems Specialists, LLC 3 North Pinckney Street - suite 202 Madison, WI 53703 USA P:+1.608.274.2577 F:+1.608.278.1475 d.bradley@tess-inc.com http://www.tess-inc.com http://www.trnsys.com |