CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CD-adapco (
-   -   looping a macro (

Troy July 3, 2008 18:17

looping a macro
I'm trying to edit a macro so that it is included in a for loop. When I add the "for" command and try running it, I get errors that seem like it's not recognizing the command.

Do I need more commands than the "for" statement below?

I'm not fluent in Java, so forgive the naivety

************************************************** ****** (from an archived thread)

it is pretty easy to do

firstly setup your model then record a macro that contains

1) the pressing of the step button. This makes the simulation take one timestep/iteration

2) the post processing steps you want (exports etc)

Stop the recording and open up the java file. The next step is to wrap this code in a java for or while statement, for example

int imax=100; //maximum number of steps


// insert your recorded macro code here


Any java book or a bit of work with google should sort you out.

All times are GMT -4. The time now is 18:04.