I want to be able to get the names of the Runs that I create during simulation.
Is there a way to get the run names of the simulation runs?
Help


Hi,Administrator wrote:How are you creating the runs? If you are using a FileOpenDialog, just store the filenames returned from that.
Or if you want all .VDF files in a directory, there are plenty of free code examples on the web showing how to do that.
Hi,Administrator wrote:ok, use the vensim_get_info function, you can get the list of loaded runs using that.
Code: Select all
Sub Get_Vensim_Info()
Dim buf As String * 512
result = vensim_command("SPECIAL>LOADMODEL|c:\Program Files\vensim\dll\worldapp.vpm")
vensim_command ("SIMULATE>CHGFILE|changes.cin")
vensim_command ("SIMULATE>DATA|data")
For i = 1 To 21
length = vensim_get_info(i, buf, 500)
Worksheets("Sheet1").Cells(21, 5 + i).Value = buf
Next i
End Sub