Normally it should be perl but other users told me that python is more useful,<br><br>Personaly I used PERL, to start programming, I recommend you to read the book "Learning Perl" from Randal L.Schwartz,(O'reilly). <br>
<br>Normally your perl file should look like this: (FOR YOUR CHANGE GEOMETRY SECTION)<br><br>--------------------------------------------------------------<br>$file = $ARGV[0];<br>$largo = $ARGV[1];<br>$ancho = $ARGV[2];<br>
$alto = $ARGV[3];<br>$angulo = $ARGV[4];<br>$base = $largo*$ancho;<br><br># Parse the perl sign pound (#)<br>$val = "#";<br><br># open up MYFILE for writing<br>open(MYFILE,">$file"); <br><br>#or die "Can't open up myfile: $file\n"; if we want the file to be readed!<br>
<br># now this line format will automatically apply to MYFILE<br>format MYFILE = <br>@<geometry of test_zonep defined in: ../zones/test_zonep.geo<br>$val<br>GEN test_zonep test_zonep describes a for testing in perl # type, name, descr<br>
8 6 @###.### # vertices, surfaces, rotation angle<br> $angulo<br>@< X co-ord, Y co-ord, Z co-ord<br>$val<br> 0.00000 0.00000 0.00000 # vert 1<br> @###.##### 0.00000 0.00000 # vert 2<br>
$largo,<br> @###.##### @###.##### 0.00000 # vert 3<br> $largo, $ancho<br> 0.00000 @###.##### 0.00000 # vert 4<br> $ancho .... CONTINUE<br>----------------------------------<br><br>
and you can invoke it in linux by type:<br><br><br>./<a href="http://changegeo.pl">changegeo.pl</a> ARGV1 ARGV2 ARGV3<br><br>then for your SIMULATE option check the cookbook for runing espr in text mode. <br><br>you can so do a for in a bash file, and then take out the value you are interested with "awk" (a language like perl) using this command: (FOR YOUR EVALUATE SECTION)<br>
<br>awk '/Totals/ {print $2 "\n"}' prueba$i.cfg.wc_res.data > TOTAL<br><br>then put your statement<br><br>if Total == ValueYouWant<br><br>Exit for<br><br>and then voilà! :)<br><br>Is a little bit rudimentary but I hope this could help you.<br>
<br>Regards<br clear="all"><br>-- <br>David GARCIA SANCHEZ <br>------------------------------------------------------------<br>Département Systèmes Énergétiques Environnement<br>Ecole des Mines de Nantes<br>4, Rue Alfred Kastler<br>
44300 Nantes<br>France<br>------------------------------------------------------------<br>Email: <a href="mailto:david.garcia-sanchez@emn.fr">david.garcia-sanchez@emn.fr</a><br>Tel: +33 (0) 2 51 85 82 14<br>Mobile: +33 (0) 6 78 15 08 09<br>
Fax: +33 (0) 2 51 85 82 99<br>------------------------------------------------------------<br>