Está en la página 1de 1

Run METSIM from Excel in Silent Mode

1) 2) 3) 4) Build Excel spreadsheet with input and output fields as desired. Build METSIM model with DDE input and output to Excel. Test model, DDE and Excel to make sure they function as desired. In METSIM user objects, create a BATCH function with XCAL command. The Batch function is executed when a model is loaded in silent mode. Add METSIM Button to Excel. Add following Visual Basic commands to button. Private Sub CommandButton1_Click() MyAppID = Shell("c:\metsim\metsim.exe SIL=1 MOD=FILE") End Sub Where FILE is exact and complete drive:path/file/extention Example: C:\METSIM\MEX\MWXFFDDE.SFW 6) 7) Save METSIM and Excel files in same directory as specified in path noted. Close METSIM and Excel. Reopen Excel, load file, change data, click on METSIM button. Metsim should startup, load model, read DDE input, calculate results, write DDE output and shutdown without displaying any messages. See MwxFFDDE.sfw and MwxFFDDE.xls for a working example.

5)

8)

También podría gustarte