Loading Input Data

Describes how to load data from an input data file

Loading data by file name

Loading by input data file name looks like the example code below. Create a string List to add the names of the data files you want to load data from.

 string inputPath = @"..\..\InputData";
 List<string> tableNames = new List<string>();
 
 tableNames.Add("SampleData");
 inputsManager.LoadInputs(tableNames, inputPath);

Loading all files in a folder

You can load all of the files in a specific folder, rather than entering the names of the files to be loaded one by one. The code example below loads all the files in the InputData folder.

string inputPath = @"..\..\InputData";
List<string> tableNames = new List<string>();

tableNames = inputsControl.GetInputFileNames(inputPath);
inputsManager.LoadInputs(tableNames, null, inputPath);

If you don't pass an input path to the LoadInputs method, it defaults to the path to the InputData folder that exists in the current project path.

Last updated