Documentation for LK

2 posts / 0 new
Last post
Documentation for LK

I've just started to learn LK. The syntax seems easy enough to grok, but there's not a lot of documentation on how to do fairly elementary things. Is there a good set of documentation that covers things like how to create a new case and run a simulation. I've watched some of the video, but it only seems to cover how to work with an existing case. I'm working with a batch of parcels and would like to create cases for each. Would it be smarter to create a template case and change only the relevant parameters, system size in my case, then write the output to a file? At any rate, can any tell me if there's document that has details on each of the SAM LK functions? Thanks in advance.

Paul Gilman


Thank you for the message.

You can find some example LK scripts here that might be helpful:

Click Functions at the top of the script editor window to see a searchable list of LK functions.

Click Help to open SAM's Help topic on the LK script editor with some basic instruction for how to use the editor.

From SAM's Help window, click Scripting reference to open a PDF document describing the LK scripting language.

You can create a case from LK using the create_case() function, but if you are just getting started with LK, it might be easier to create the case in SAM first, and then use the script to change input variable values and run simulations.

For example, start SAM, create a case, and then open the script editor and type the following script:

result = get('annual_energy');
outln('result = ' + result);

Then, click Run at the top of the script editor window to run the script, and it should display windows in the console at the bottom of the window.

Best regards,

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer