Enhance SAM with features tailored to your specific needs! We collaborate with companies, universities, and organizations to privately fund new capabilities or analyses. Your investment drives innovation while benefiting the broader energy community. Email us to learn more.

create_case() args

  • Andrew
  • Topic Author
More
21 Sep 2026 12:32 #14598 by Andrew
create_case() args was created by Andrew
Hello, 

I have been having difficulty calling scripts from cmd. The script works fine when called form an existing project, but simulations fail when calling it through cmd. I am trying to create a case in the script, but the create_case() below get the error "Internal Error: could not locate configuration information for Detailed PV Model/No Financial Model". I haven't been able to glean what I am doing wrong from any of the examples on Github.

create_case('Detailed PV Model', 'No Financial Model', 'Name');

Thank you,
Andrew Low

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

  • Paul Gilman
More
21 Sep 2026 14:48 #14599 by Paul Gilman
Replied by Paul Gilman on topic create_case() args
Hi Andrew,

Unfortunately, the name of the Detailed PV performance model is "Flat Plate PV". For no financial model, the name is "None". Saving an LK script named "test.lk" containing the following should work:

create_case('Flat Plate PV','None','test');

In Windows with SAM 2026.7.3, you could run that from the command line with:

C:\SAM\2026.7.3\x64\sam.exe abc path\to\test.lk

To see a list of performance model names in LK, you can use:

x = list_technologies();
outln(x);

Similarly, you can use list_financing("Flat Plate PV") to create a list of financial models available for the Detailed PV model.

Best regards,
Paul.

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

  • Andrew
  • Topic Author
More
21 Sep 2026 16:07 #14600 by Andrew
Replied by Andrew on topic create_case() args
Good to know. Thank you for clarifying!

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

Moderators: Paul Gilman
Powered by Kunena Forum