[TRNSYS-users] ddl or api for trnsys.exe

Maurice Charbit - OZE-ENERGIES mch at oze-energies.com
Fri Jul 3 09:20:23 PDT 2020


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 at tess-inc.com>
Envoyé : vendredi 3 juillet 2020 17:39
À : TRNSYS users mailing list at OneBuilding.org <trnsys-users at lists.onebuilding.org>
Cc : Maurice Charbit - OZE-ENERGIES <mch at 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:
Hi,

I am using TRNSYS for industrial development.  For this purposes  I develop a program in Python language which calsl TRNSYS.exe via subprocess function. It takes a lot of time because it means running via Windows.

Does it exist  a code (something like an API or a DLL)  which can be called directly from Python ?

Best regards



Maurice

tel: +33 (0)6 52 30 11 71



_______________________________________________
TRNSYS-users mailing list
TRNSYS-users at lists.onebuilding.org<mailto:TRNSYS-users at lists.onebuilding.org>
http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org


--
***************************
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 at tess-inc.com<mailto:d.bradley at tess-inc.com>

http://www.tess-inc.com
http://www.trnsys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20200703/3d1b329e/attachment.htm>


More information about the TRNSYS-users mailing list