Page 1 of 1

unknown source of file written to model dir using command

Posted: Fri Jan 28, 2011 9:59 pm
by PWR
I am writing and reading files using venapp commands. I wish to place the files within a directory structure. I wish to verify the proper path name syntax to place the file into the directory and I need to find out what other vensim command is writing a duplicate file into a different directory.

This is what I have tried. I get two files, one written to Dir1\file.vdf where I intended and a duplicate, file.vdf, written to the model's directory (which is up one level). The problem may be coming from somewhere else in the Sable scripts where these commands are issued, but I just wanted first to make sure that this is the correct syntax to use for writing a file into or reading a file from a directory. I tried writing to another directory, down one level which worked so I believe that the syntax is correct, but I still get the duplicate file written into the model's directory. I don't understand how I'm writing the duplicate file. I have replaced all instances of "file.vdf" with "Dir1\file.vdf" in the script code so I can't have just missed a copy.

Call RunVenappCommand("SPECIAL>LOADRUN|Dir1\file.vdf")

A second question: is there a list of which commands read or write files other than "Chapter 5 Commands Descriptions" Overview found in the vensim help.

(I 'm running 5.10e windows xp service pack up to date under VMware Fusion 3)

Thanks

Re: unknown source of file written to model dir using comman

Posted: Mon Jan 31, 2011 9:16 am
by Administrator
I think when you are running the model, it is saving the run to the model directory.

Have you called "SIMULATE>RUNNAME|" and passed in the correct file name (eg, the following instructs the Vensim engine to save the file "run1.vdf" to the "uncertainty" sub-directory)

Call RunVenappCommand("SIMULATE>RUNNAME|Uncertainty\run1.vdf")