I want to do both actually (about the result). I want to manipulate a Result's Report via API as I do in GUI; finally, create output files from those results.
The following code is my JScript. Different formats that I tested are commented in the code. None of the works to assign ReadFromFile to Expression of a variable. (I see 'Error 2' for each one of the four ReadFromFile formats that you tried)
var WshShell = new ActiveXObject("WScript.Shell");
var LEAP;
var RunCount = 10;
OpenLEAP();
LEAP.ActiveArea = "Freedonia";
LEAP.ActiveScenario = "Reference";
LEAP.Branch("Demand\\Household\\Urban").Variable("Activity Level").Expression = 50;
//LEAP.Branch("Demand\Household\Urban").Variable("Activity Level").Expression = "ReadFromFile(D:\New Folder\Input.csv)";
//LEAP.Branch("Demand\\Household\\Urban").Variable("Activity Level").Expression = "ReadFromFile(D:\New Folder\Input.csv)";
//LEAP.Branch("Demand\\Household\\Urban").Variable("Activity Level").Expression = "ReadFromFile(D:\\New Folder\\Input.csv)";
//LEAP.Branch("Demand\\Household\\Urban").Variable("Activity Level").Expression = "ReadFromFile(D:/New Folder/Input.csv)";
//LEAP.Branch("Demand\\Household\\Urban").Variable("Activity Level").Expression = "ReadFromFile(D://New Folder//Input.csv)";
for (var i = 1; i <= RunCount; i++)
{
LEAP.Calculate(false);
LEAP.ExportResultsCSV("D:/Result_" + i + ".csv");
}
WScript.Echo("End");
//---------------------------------------------------
function OpenLEAP(){
LEAP = new ActiveXObject("LEAP.LEAPApplication");
while (!LEAP.ProgramStarted){
//WScript.Sleep(100);
}
LEAP.Verbose = 1;
}