Need a macro to run every timestep
1.) Do macros automatically run every timestep? 2.) Does anyone have a sample of such a macro?
I need to come up with my own macro to export XYZ tables each timestep but I'm not sure how to go about getting the macro to run every step. Thanks! |
Re: Need a macro to run every timestep
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 for(i=0;i<imax;i++){ // insert your recorded macro code here } Any java book or a bit of work with google should sort you out. |
Re: Need a macro to run every timestep
Thanks Steve!
I guess that was kind of a no-brainer. I hadn't though about the fact that you can step just once like that. |
All times are GMT -4. The time now is 07:58. |