To use this program and spreadsheet to automate running Diamond Mind:

Make the custom standings page which the spreadsheet is formatted for:

1) Go to Reports->Standard,customized, memorized
2) Select League standings/DMB league standings
3) Click Generate
4) Select Major League Baseball (Org) in the For org or league: pulldown
5) Select Full Name in the Sort division standings by: pulldown
6) Under sections I removed Wildcard, Expanded1, and Expanded2
7) Hit OK, then click Customize
8) Remove Year, Overall Winning pct, Games behind, <blank>, Last ten games, Current streak, Recent results, and magic #
This should leave: Full name, Wins, Losses, Runs for, Runs against, and Run margin
9) Go to close it, and you'll get prompted that it's been customized, and do you wish to save it.  Save it with the name 'DMB league standings sorted by name' (without the single quotes).
10) Uncheck the option to include 'standard' in the report list (DMB league standings sorted by name needs to be the first report listed under season standings for this to work)

I have created two macros to speed up the importing of these text files into the spreadsheet.
In order to use them:

1)You must give the files the name "DMB league standings sorted by nameXX.txt", where XX is the season # 1-100.
2)Detach the files ColumnG.txt, ColumnH.txt, ColumnI.txt, ColumnJ.txt, ColumnK.txt, ColumnL.txt, and ColumnM.txt into the folder of the season you are running, for ex: C:\dmb9\2005 Zips.

Save the spreadsheet DMBStandings.xls in the folder of your season.

To start running the simulations, run the exe file RunDMB.exe.  It is best to do this when you won't be using your computer, otherwise it won't work real well.  I run mine at night.  Click the Run Diamond Mind button, You will be asked for a start season.  Use 1, unless you've already run some already and wish to continue from there.  For End season, figure out how many you wish to run (spreadsheet is limited to 100).  Next, value how long it typically takes your computer to run a season, in seconds.  On my computer it's 180 sec, for yours it could be more or less.  You need to build in enough time so that the season will finish before that time is up.  Then, the program will write the standings file into the league directory automatically, reset the season and restart.   

When you are finished, you can open up the DMBStandings.xls file that you saved in your league folder. Then, you can run two macros in the spreadsheet to pull in the numbers.

In order to run the first macro, enter the path of the league where the standings files were saved in the F2 cell on the second worksheet(DMB league standings brief), then go to Tools->Macros->Macros, and run ImportSeasons.  This will pull in the results of each season.  It will work for fewer than 100 seasons, but you'll get an error when You hit the last file on the first macro. This isn't a big deal, just click End.

In order to run the second macro, go to the second worksheet (DMB league standings brief), then go to Tools->Macros->Macros, and run Playoffs.  This will calculate the division winners and wild cards.  This may still be buggy, so if you see any errors let me know.





