CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Macro Issue Exporting Chart Data (http://www.cfd-online.com/Forums/cfx/86522-macro-issue-exporting-chart-data.html)

recon9 March 24, 2011 13:11

Macro Issue Exporting Chart Data
 
Hello,

I am having troubles with a macro I am trying to use to export chart data over a range of time steps. Below is the code I am attempting to use. It works and exports the first set of data but stops after that. Any idea why it doesn't keep running the loop?

Code:

!$start = 400;
!$finish = 1400;

!for($i=$start,$i<=$finish,$i+5) {
> load timestep=$i EXPORT:
Export File = C:/CFX/Unsteady 10 k e/$i.csv
Export Chart Name = Pressure Chart
Overwrite = On
END
>export chart
!}



Thanks,

Brady

recon9 March 24, 2011 13:46

Nevermind, I figured it out. I created a new variable "name" to name my .csv files in sequential order. Here are my changes:

p, li { white-space: pre-wrap; }
!$start = 400;

!$finish = 420;

!$name = 1;

!for($i=$start; $i<$finish; $name++) {

> load timestep=$i
EXPORT:
Export File = C:/CFX/Unsteady 10 k e/$name.csv
Export Chart Name = Pressure Chart
Overwrite = On
END
>export chart
!$i=$i+5;
!}


All times are GMT -4. The time now is 08:17.