Hi Adam,
You can use the LK get() and set() functions to read and write values of SAM inputs (also use get() to read an output variable's value).
Click
Variables at the top of the script editor window to see a list of input and output variable names.
Click
Help to display the Help topic for the script editor, and then click
Scripting reference at the top of the Help window to download a PDF reference for the LK language.
For example, the input variable for the nameplate capacity of the PVWatts model is 'system_nameplate', so you could use the following line of code to set its value to 100 kW:
set('system_capacity', 100)
You can use the csvread() function to read data from a CSV file. The csv-functions.lk sample script should help with learning how to do that:
github.com/NREL/SAM/tree/patch/samples/LK%20Scripts%20for%20SAM
Best regards,
Paul.