Integrate SAM to C# code

  • Salma
  • Topic Author
More
07 Aug 2023 14:33 #12379 by Salma
Integrate SAM to C# code was created by Salma
Hi,
I'm trying to use SDK in a C# program, I followed the steps described in the help document by generating the C# code from the desktop application. I was expecting the software to generate C# files but I'm getting C/C++ file (sscapi.h). Also, when I try to import the library ssc64.dll into my project, I get "The reference is invalid or unsupported".
Am I doing something wrong?
Thank you

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

  • Paul Gilman
More
08 Aug 2023 16:14 #12393 by Paul Gilman
Replied by Paul Gilman on topic Integrate SAM to C# code
Hi Salma,

There are some errors in the C# code created by SAM's code generator.

1. SAM creates a file named "native-lib.cpp". You can change the extension from ".cpp" to ".cs" if it causes problems with your C# development environment.

2. The declaration of the variable 'time' in each block of code that runs a module is incorrect. The variable type should be 'double' instead of 'float'. Please try changing those variable declarations.

We will fix these problems for the Fall 2023 release: github.com/NREL/SAM/issues/1427.

Best regards,
Paul.

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

Moderators: Paul Gilman
Powered by Kunena Forum