- Posts: 2
Running Python Scripts from SAM
- McGowan
- Topic Author
Less
More
31 Jul 2024 11:17 #13351
by McGowan
Running Python Scripts from SAM was created by McGowan
Will there be any development of executing Python scripts from SAM, instead of LK scripts? The user would be able to use SAM's GUI and develop the model, but then could use a .py script to execute the model instead of an .lk script. It seems that LK scripts are being phased out, and Python has much more versatility and support. I know that there is PySAM, but for those who aren't versed in programming, using SAM's GUI to execute Python instead of writing code helps. The other solution is instead developing a primitive SAM GUI in Python, but that is a large lift for a small gain.
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
31 Jul 2024 17:47 #13356
by pgilman
Replied by pgilman on topic Running Python Scripts from SAM
Hello,
We have discussed the possibility of replacing SAM's LK scripting language ( sam.nrel.gov/lk-script.html ) with Python, but because LK is used for several behind-the-scene applications within the user interface, determined that this is not practical.
We have no plans to phase out LK scripting.
If you are a Python coder, I recommend using the PySAM package for Python. Otherwise, LK is relatively easy to learn and useful for automating tasks from the SAM user interface.
Best regards,
Paul.
We have discussed the possibility of replacing SAM's LK scripting language ( sam.nrel.gov/lk-script.html ) with Python, but because LK is used for several behind-the-scene applications within the user interface, determined that this is not practical.
We have no plans to phase out LK scripting.
If you are a Python coder, I recommend using the PySAM package for Python. Otherwise, LK is relatively easy to learn and useful for automating tasks from the SAM user interface.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- McGowan
- Topic Author
Less
More
- Posts: 2
31 Jul 2024 19:44 #13358
by McGowan
Replied by McGowan on topic Running Python Scripts from SAM
That makes sense. In my use case, I have used PySAM frequently, but many of my associates don't have enough python experience to use the models and tools I've built. I have learned LK and created a couple of scripts and it is pretty easy, but I was mostly just curious if there was any talk of phasing it out completely.
Thanks for the answer!
Thanks for the answer!
Please Log in or Create an account to join the conversation.
Moderators: pgilman