LK Script is a scripting language with syntax similar to C that is built in to SAM and the SAM SDKtool, and is used internally for SAM's user interface. It is analogous to VBA in Excel and allows you to automate repetitive or complex simulation tasks. You can use it to:
- Read and write data to text files.
- Read and write values of SAM input variables.
- Run simulations.
- Read values of SAM output variables.
- Create graphs.
For examples of LK scripts for SAM, see LK Samples in the SAM GitHub repository. Use the raw link to download the LK script files:
The LK Guide manual describes the language (PDF 273 KB)
If you are interested in contributing to LK, you can do so at LK on GitHub.