Run TUFLOW From PowerShell: Difference between revisions

Content deleted Content added
Line 94:
 
= Advanced Example=
<pre>
<pre>
#TUFLOW RUN VARIABLES
$EXE = C:\bin\TUFLOW\2025.0.3\TUFLOW_iSP_w64.exe
$scenarios = @("1m", "2m", "5m")
$events = @("1hr", "2hr", "5hr")
 
#SIMULATION EXECUTION LOOP
foreach ($scenario in $scenarios){
foreach ($event in $events){
$EXE '-b' '-s1' $scenario '-e1' $event 'model_~s1~_~e1~.tcf'
}
}
 
$Outlook = New-Object -ComObject Outlook.Application
$Mail = $Outlook.CreateItem(0)
$Mail.Subject = "TUFLOW Simulation Finished"
$Mail.To = "first_recipient_email_address_here"
$Mail.To = "second_recipient_email_address_here"
$Mail.Send()
 
$Mail.Body = Get-Content -Raw '.\_ TUFLOW Simulations.log'
$Mail.Send()
exit
 
 
</pre>