PAN to SAM macro automation

  • aberrios
  • Topic Author
More
10 Feb 2023 04:58 #11914 by aberrios
PAN to SAM macro automation was created by aberrios
Hi everyone! 

I am curious if anyone has tried to write a python script to batch process a large volume of PVSyst PAN files using the PAN to SAM macro. We are currently trying to process our 3rd-party file database for internal use.

Can this macro be called from the command line? Any experience anyone can share in this regard would be greatly appreciated!

All the best, -AB

Please Log in or Create an account to join the conversation.

  • pgilman
More
13 Feb 2023 17:33 #11925 by pgilman
Replied by pgilman on topic PAN to SAM macro automation
Hi AB,

The best approach for this might be to translate the "PVsyst OND - PAN to SAM.lk" script from LK into Python. LK is a C-like scripting language, so someone familar with both C/C++ and Python should be able to do a translation.

To see the macro's LK script in SAM, click View code on the Macro page. You could also modify the LK script to do a batch conversion.

See the "Macros and Scripting" Help topic for more about LK and macros, and for steps for running a macro from the command line: samrepo.nrelcloud.org/help/macros.htm

There are a couple of SAM-related Python scripts in the SAM GitHub repository ( github.com/NREL/SAM/tree/patch/samples/Python%20Scripts ). If anyone does write a Python script for this and wants to share it, we would be happy to post it there.

Best regards,
Paul.

p.s. There are separate Python samples for PySAM here: github.com/NREL/pysam/tree/main/Examples .
 

Please Log in or Create an account to join the conversation.

  • aberrios
  • Topic Author
More
14 Feb 2023 08:00 #11926 by aberrios
Replied by aberrios on topic PAN to SAM macro automation
Hi Paul, thank you for the reply and the provided references. We'll delve deeper into this! Best wishes! -AB

Please Log in or Create an account to join the conversation.

Moderators: pgilman
Powered by Kunena Forum