[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] subcall process



thanks a lot, your suggestion is interesting




De : David BRADLEY <d.bradley@tess-inc.com>
Envoyé : jeudi 1 juillet 2021 17:26
À : Maurice Charbit - OZE-ENERGIES <mch@oze-energies.com>; TRNSYS users mailing list at OneBuilding.org <trnsys-users@lists.onebuilding.org>
Objet : Re: [TRNSYS-users] subcall process
 

I am afraid I do not know of a way to suppress errors that are generated by TRNBuild. Again I don't know Python but in some other scripting languages there is the possibility of specifying a "time out" such that if the called process doesn't respond within a specified amount of time the script can proceed anyway.

kind regards,

 David



On 07/01/2021 10:02, Maurice Charbit - OZE-ENERGIES wrote:
Hi David

Thank you for the response. I did what you propose. More specifically my prog is

    exe_trnsys        = subprocess.call([cmdtrnsysExe,file_DCK,"/h"])

The problem is the following: 

when TRNSYS crashes, as for example when a bad parameter is present in file .B18 as incompatible thickness, TRNSYS stops and opens a window to indicate a problem and waits for a manual answer, more specifically you have to click on the 'OK' button to exit TRNSYS. As long as you dont click on the button TRNSYS is waiting.

I would like to exit by program and replace the manual response by soft.

regards


De : David BRADLEY <d.bradley@tess-inc.com>
Envoyé : jeudi 1 juillet 2021 16:36
À : 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] subcall process
 

Maurice,

  The exe is probably asking you for the name of the input file that you want to run. The Windows command line to launch Trnsys and give it an input file name follows. I have never tried to implement this from Python but hopefully it works anyway.

c:\Trnsys18\Exe\TRNExe64.exe c:\Trnsys18\MyProjects\Project1\inputFile.dck /n /h

The /n flag is optional and suppresses the acknowledgement that is normally required at the end of the simulation. Be aware that this flag will also suppress the needed acknowledgement if an error occurs during the simulation.

The /h flag is also optional and forces Trnsys to run completely hidden in the background.

kind regards,

 David


On 07/01/2021 06:52, Maurice Charbit - OZE-ENERGIES via TRNSYS-users wrote:

Hi all,

 

I am using subcall.process in Python to launch trnsys.exe.

When an error occurs in trnsys, trnsys opens a window and asks for a MANUAL response to exit from the .exe. How can I do to force by program this response?

 

Regards

Maurice

 

 

 

Provenance : Courrier pour Windows 10

 


_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@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
d.bradley@tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com
-- 
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
3 North Pinckney Street - suite 202
Madison, WI  53703 USA

P:+1.608.274.2577
d.bradley@tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com