<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Maurice,</p>
    <p>  As soon as you call the TRNExe64.exe, it calls the TRNDll64.dll
      so I don't think that the communication is going to get any faster
      since Trnsys is already a dll. The *.exe part of TRNSYS is mostly
      occupied with the online plotter so if you get rid of all the
      Type65s in your simulation it will run a bit faster. However, if
      you have already used the /h switch then that is about as fast as
      it is going to get.</p>
    <p>kind regards,</p>
    <p> David</p>
    <p><br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 07/03/2020 11:20, Maurice Charbit -
      OZE-ENERGIES wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:VE1P189MB0911B432EF6F4771DBB7BF1D8A6A0@VE1P189MB0911.EURP189.PROD.OUTLOOK.COM">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        David</div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        What you advise is what I did:<span style="color: rgb(0, 0, 0);
          font-family: Calibri, Arial, Helvetica, sans-serif; font-size:
          12pt;">    </span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span style="color: rgb(0, 0, 0); font-family: Calibri, Arial,
          Helvetica, sans-serif; font-size: 12pt;">    arg1            
                = directory where TRNSYS.exe is</span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <div>    arg2                   = name of the DCK file<br>
        </div>
        <div>    arg3                   = "/h" (to avoid that window
          open the interface)<br>
        </div>
        <span>    exe_trnsys        = subprocess.call([arg1,arg2,arg3])</span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span><br>
        </span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span>but it is very slow. A better way will be to have a .dll</span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <span><br>
        </span></div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        best regards</div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <br>
      </div>
      <hr tabindex="-1" style="display:inline-block; width:98%">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          face="Calibri, sans-serif" color="#000000"><b>De :</b> David
          BRADLEY <a class="moz-txt-link-rfc2396E" href="mailto:d.bradley@tess-inc.com"><d.bradley@tess-inc.com></a><br>
          <b>Envoyé :</b> vendredi 3 juillet 2020 17:39<br>
          <b>À :</b> TRNSYS users mailing list at OneBuilding.org
          <a class="moz-txt-link-rfc2396E" href="mailto:trnsys-users@lists.onebuilding.org"><trnsys-users@lists.onebuilding.org></a><br>
          <b>Cc :</b> Maurice Charbit - OZE-ENERGIES
          <a class="moz-txt-link-rfc2396E" href="mailto:mch@oze-energies.com"><mch@oze-energies.com></a><br>
          <b>Objet :</b> Re: [TRNSYS-users] ddl or api for trnsys.exe</font>
        <div> </div>
      </div>
      <div>
        <p style="margin-top: 0px; margin-bottom: 0px;">Maurice,</p>
        <p style="margin-top: 0px; margin-bottom: 0px;"> 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:<br>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;"> </p>
        <p style="margin-top: 0px; margin-bottom: 0px;">c:\Trnsys18\Exe\TRNExe64.exe
"c:\Trnsys18\Examples\Calling_Contam\CombinedThermalAirflow_AHU.dck"
          <br>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;"><br>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;">if you add a /n
          at the end of the line then there will be no need to click
          "ok" when the run completes.</p>
        <p style="margin-top: 0px; margin-bottom: 0px;">if you add a /h
          at the end of the line then TRNSYS will run entirely in the
          background.</p>
        <p style="margin-top: 0px; margin-bottom: 0px;"><br>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;">kind regards,</p>
        <p style="margin-top: 0px; margin-bottom: 0px;"> David</p>
        <p style="margin-top: 0px; margin-bottom: 0px;"><br>
        </p>
        <p style="margin-top: 0px; margin-bottom: 0px;"><br>
        </p>
        <div class="x_moz-cite-prefix">On 07/03/2020 09:45, Maurice
          Charbit - OZE-ENERGIES via TRNSYS-users wrote:<br>
        </div>
        <blockquote type="cite">
          <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
            font-size:12pt; color:rgb(0,0,0)">
            <div style="margin:0px; font-size:12pt;
              font-family:Calibri,Arial,Helvetica,sans-serif;
              color:black; background-color:rgb(255,255,255)">
              Hi,</div>
            <div style="margin:0px; font-size:12pt;
              font-family:Calibri,Arial,Helvetica,sans-serif;
              color:black; background-color:rgb(255,255,255)">
              <br>
            </div>
            <div style="margin:0px; font-size:12pt;
              font-family:Calibri,Arial,Helvetica,sans-serif;
              color:black; background-color:rgb(255,255,255)">
              I am using TRNSYS for industrial development.  <span
                style="margin:0px">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.</span></div>
            <div style="margin:0px; font-size:12pt;
              font-family:Calibri,Arial,Helvetica,sans-serif;
              color:black; background-color:rgb(255,255,255)">
              <br>
            </div>
            <div style="margin:0px; font-size:12pt;
              font-family:Calibri,Arial,Helvetica,sans-serif;
              color:black; background-color:rgb(255,255,255)">
              Does it exist  a code (something like an API or a DLL) 
              which can be called directly from Python ?</div>
            <div style="margin:0px; font-size:12pt;
              font-family:Calibri,Arial,Helvetica,sans-serif;
              color:black; background-color:rgb(255,255,255)">
              <br>
            </div>
            <div style="margin:0px; font-size:12pt;
              font-family:Calibri,Arial,Helvetica,sans-serif;
              color:black; background-color:rgb(255,255,255)">
              <span style="margin:0px">Best regards</span></div>
            <br>
          </div>
          <div>
            <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
              font-size:12pt; color:rgb(0,0,0)">
              <br>
            </div>
            <div id="x_Signature">
              <div>
                <div id="x_divtagdefaultwrapper" dir="ltr"
                  style="font-size:12pt; color:#000000;
                  font-family:Calibri,Helvetica,sans-serif">
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top:0px; margin-bottom:0px; margin-top:0;
                    margin-bottom:0">
                    Maurice</p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top:0px; margin-bottom:0px; margin-top:0;
                    margin-bottom:0">
                    tel: +33 (0)6 52 30 11 71<br>
                  </p>
                </div>
              </div>
            </div>
          </div>
          <br>
          <fieldset class="x_mimeAttachmentHeader"></fieldset>
          <pre class="x_moz-quote-pre">_______________________________________________
TRNSYS-users mailing list
<a class="x_moz-txt-link-abbreviated" href="mailto:TRNSYS-users@lists.onebuilding.org" moz-do-not-send="true">TRNSYS-users@lists.onebuilding.org</a>
<a class="x_moz-txt-link-freetext" href="http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org" moz-do-not-send="true">http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org</a>
</pre>
        </blockquote>
        <pre class="x_moz-signature" cols="72">-- 
***************************
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
<a class="x_moz-txt-link-abbreviated" href="mailto:d.bradley@tess-inc.com" moz-do-not-send="true">d.bradley@tess-inc.com</a>

<a class="x_moz-txt-link-freetext" href="http://www.tess-inc.com" moz-do-not-send="true">http://www.tess-inc.com</a>
<a class="x_moz-txt-link-freetext" href="http://www.trnsys.com" moz-do-not-send="true">http://www.trnsys.com</a></pre>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
***************************
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
<a class="moz-txt-link-abbreviated" href="mailto:d.bradley@tess-inc.com">d.bradley@tess-inc.com</a>

<a class="moz-txt-link-freetext" href="http://www.tess-inc.com">http://www.tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.trnsys.com">http://www.trnsys.com</a></pre>
  </body>
</html>