<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8"><title></title><meta name="GENERATOR" content="OpenOffice.org 3.0  (Win32)"><style type="text/css">
        <!--
                @page { margin: 2cm }
                P { margin-bottom: 0.21cm }
        -->
        </style>
<p style="margin-bottom: 0cm;">Thanks for all the feedback, its
helping me a lot.</p><p style="margin-bottom: 0cm;"><br>I have a couple of more basic questions, I&#39;m not
used to ESP-r scripting &quot;environment&quot; (I come from other software with embedded scripting functionality, like ecotect or rhino). I
have noticed that many of the scripts use the C:\ shell, but I have a
couple of problems to advance in that path.<br>First, I don&#39;t know
how to run the software&#39;s commands, is there any document with the
methods or an API guide? for example if I want to create a zone, how
do I call that method from inside the shell? <br>The other question regards the
possibility to write longer code, for example: create a zone, then
10 windows, assign material, etc... all in one block. I think this should
be done in Perl (or Python) but I don&#39;t know how to run it and connected to
ESP-r methods.</p>
<p style="margin-bottom: 0cm;">
</p>
<p style="margin-bottom: 0cm;">Thanks again,</p>

<p style="margin-bottom: 0cm;">Victor</p>
<br><br><br><div class="gmail_quote">On Tue, Jul 27, 2010 at 8:40 PM, Aizaz Samuel <span dir="ltr">&lt;<a href="mailto:aizaz.a.samuel@strath.ac.uk">aizaz.a.samuel@strath.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Some instances where scripts have been used in the past:<br>
1. ESP-r modelling of domestic heating systems (ADEPT2 available from<br>
<a href="http://sesg.strath.ac.uk" target="_blank">sesg.strath.ac.uk</a>) has scripts that simulate and list the results into csv<br>
files that are readable by spreadsheet macros.<br>
2. Simulation of test models that simulate and write out results in pdf<br>
format. These are used for running comparison tests periodically and writing<br>
out a nicely formatted report.<br>
3. Running regression testing that involves subversion commands, forcheck,<br>
compilation, simulation, results analysis and some other software testing<br>
tasks. (Available at<br>
<a href="https://espr.svn.cvsdude.com/esp-r/trunk/tester/scripts/" target="_blank">https://espr.svn.cvsdude.com/esp-r/trunk/tester/scripts/</a>)<br>
<br>
The first two use bash and c shell scripts the last one uses perl<br>
<br>
Regards,<br>
--<br>
Dr Aizaz A Samuel<br>
Department of Mechanical Engineering<br>
University of Strathclyde<br>
M324 James Weir Building<br>
75 Montrose Street<br>
Glasgow, UK<br>
G1 1XJ<br>
<br>
T:+44 141 548 5765<br>
F:+44 141 552 5105<br>
<div><div></div><div class="h5"><br>
<br>
On Tuesday 27 July 2010 10:57, David Garcia wrote:<br>
&gt; Normally it should be perl but other users told me that python is more<br>
&gt; useful,<br>
&gt;<br>
&gt; Personaly I used PERL, to start programming, I recommend you to read the<br>
&gt; book &quot;Learning Perl&quot; from Randal L.Schwartz,(O&#39;reilly).<br>
&gt;<br>
&gt; Normally your perl file should look like this: (FOR YOUR CHANGE GEOMETRY<br>
&gt; SECTION)<br>
&gt;<br>
&gt; --------------------------------------------------------------<br>
&gt; $file = $ARGV[0];<br>
&gt; $largo = $ARGV[1];<br>
&gt; $ancho = $ARGV[2];<br>
&gt; $alto = $ARGV[3];<br>
&gt; $angulo = $ARGV[4];<br>
&gt; $base = $largo*$ancho;<br>
&gt;<br>
&gt; # Parse the perl sign pound (#)<br>
&gt; $val = &quot;#&quot;;<br>
&gt;<br>
&gt; # open up MYFILE for writing<br>
&gt; open(MYFILE,&quot;&gt;$file&quot;);<br>
&gt;<br>
&gt; #or die &quot;Can&#39;t open up myfile: $file\n&quot;; if we want the file to be readed!<br>
&gt;<br>
&gt; # now this line format will automatically apply to MYFILE<br>
&gt; format MYFILE =<br>
&gt; @&lt;geometry of test_zonep defined in: ../zones/test_zonep.geo<br>
&gt; $val<br>
&gt; GEN  test_zonep  test_zonep describes a for testing in perl  # type, name,<br>
&gt; descr 8       6   @###.###    # vertices, surfaces, rotation angle $angulo<br>
&gt; @&lt; X co-ord, Y co-ord, Z co-ord<br>
&gt; $val<br>
&gt;       0.00000     0.00000     0.00000  # vert   1<br>
&gt;    @###.#####     0.00000     0.00000  # vert   2<br>
&gt;     $largo,<br>
&gt;    @###.#####  @###.#####     0.00000  # vert   3<br>
&gt;     $largo,   $ancho<br>
&gt;       0.00000  @###.#####     0.00000  # vert   4<br>
&gt;           $ancho  .... CONTINUE<br>
&gt; ----------------------------------<br>
&gt;<br>
&gt; and you can invoke it in linux by type:<br>
&gt;<br>
&gt;<br>
</div></div>&gt; ./<a href="http://changegeo.pl" target="_blank">changegeo.pl</a>&lt;<a href="http://changegeo.pl" target="_blank">http://changegeo.pl</a>&gt; ARGV1 ARGV2 ARGV3<br>
<div class="im">&gt;<br>
&gt; then for your SIMULATE option check the cookbook for runing espr in text<br>
&gt; mode.<br>
&gt;<br>
&gt; you can so do a for in a bash file, and then take out the value you are<br>
&gt; interested with &quot;awk&quot; (a language like perl) using this command: (FOR YOUR<br>
&gt; EVALUATE SECTION)<br>
&gt;<br>
&gt; awk &#39;/Totals/ {print $2 &quot;\n&quot;}&#39; prueba$i.cfg.wc_res.data &gt; TOTAL<br>
&gt;<br>
&gt; then put your statement<br>
&gt;<br>
&gt; if Total == ValueYouWant<br>
&gt;<br>
&gt; Exit for<br>
&gt;<br>
&gt; and then voilà! :)<br>
&gt;<br>
&gt; Is a little bit rudimentary but I hope this could help you.<br>
&gt;<br>
&gt; Regards<br>
&gt;<br>
&gt; --<br>
&gt; David GARCIA SANCHEZ<br>
&gt; ------------------------------------------------------------<br>
&gt; Département Systèmes Énergétiques Environnement<br>
&gt; Ecole des Mines de Nantes<br>
&gt; 4, Rue Alfred Kastler<br>
&gt; 44300 Nantes<br>
&gt; France<br>
&gt; ------------------------------------------------------------<br>
</div>&gt; Email: <a href="mailto:david.garcia-sanchez@emn.fr">david.garcia-sanchez@emn.fr</a>&lt;mailto:<a href="mailto:david.garcia-sanchez@emn.fr">david.garcia-sanchez@emn.fr</a>&gt;<br>
<div><div></div><div class="h5">&gt; Tel: +33 (0) 2 51 85 82 14<br>
&gt; Mobile: +33 (0) 6 78 15 08 09<br>
&gt; Fax: +33 (0) 2 51 85 82 99<br>
&gt; ------------------------------------------------------------<br>
</div></div></blockquote></div><br>