- Posts: 26
Custom Report
- Gabriel Simões
- Topic Author
        Less
        More
        
            
    
        
            
        
                06 Sep 2022 11:51                #11425
        by Gabriel Simões
    
    
            
            
            
            
            
                                
    
                                                
    
        Custom Report was created by Gabriel Simões            
    
        Good Afternoon
At first, I wanna to confirm if SAM has the option to have the report custom into SAM's platform.
If it doesn't present this option, I would like to know if you know about a LK script on github already done that makes a custom report for SAM's results. I spent some time today searching for a script which fits in to this request, but no luck.
My custom report would just add some information to it, like as some graphs, maybe some tables.
Best Regards
    At first, I wanna to confirm if SAM has the option to have the report custom into SAM's platform.
If it doesn't present this option, I would like to know if you know about a LK script on github already done that makes a custom report for SAM's results. I spent some time today searching for a script which fits in to this request, but no luck.
My custom report would just add some information to it, like as some graphs, maybe some tables.
Best Regards
Please Log in or Create an account to join the conversation.
- Paul Gilman
        Less
        More
        
            
    
        - Posts: 5665
            
        
                07 Sep 2022 13:37                #11428
        by Paul Gilman
    
    
            
            
            
            
            
                                
    
                                                
    
        Replied by Paul Gilman on topic Custom Report            
    
        Hi Gabriel,
SAM's report template editor is not available in the SAM user interface. We have received requests to make one available, but have not yet received funding to do this work: github.com/NREL/SAM/issues/308
In the meantime, you could use the ME Wave Report macro as an example of how to write a report generator in LK script. To see the macro, create a Marine Wave / LCE Calculator case, and click Macros under the Simulate button. Then click ME Wave Report and click View code at the top right of the Macros page.
If you want to convert that macro to an LK script, copy and paste the code starting from Line 58 into a text file with the .lk extension. Note that the script uses the 'macro' table to set the value of inputs, so you will need to set the values of those variables in your script. For example, replace Line 101
with
This example is for the Marine Wave Energy performance model with the LCOE Calculator financial model, so you will have to modify it to use with different models.
Best regards,
Paul.
    SAM's report template editor is not available in the SAM user interface. We have received requests to make one available, but have not yet received funding to do this work: github.com/NREL/SAM/issues/308
In the meantime, you could use the ME Wave Report macro as an example of how to write a report generator in LK script. To see the macro, create a Marine Wave / LCE Calculator case, and click Macros under the Simulate button. Then click ME Wave Report and click View code at the top right of the Macros page.
If you want to convert that macro to an LK script, copy and paste the code starting from Line 58 into a text file with the .lk extension. Note that the script uses the 'macro' table to set the value of inputs, so you will need to set the values of those variables in your script. For example, replace Line 101
Code:
companyName = macro.companyName;
Code:
companyName = "My Company Name";
This example is for the Marine Wave Energy performance model with the LCOE Calculator financial model, so you will have to modify it to use with different models.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- Gabriel Simões
- Topic Author
        Less
        More
        
            
    
        - Posts: 26
            
        
                08 Sep 2022 05:14                #11430
        by Gabriel Simões
    
    
            
            
            
            
            
                                
    
                                                
    
        Replied by Gabriel Simões on topic Custom Report            
    
        Thank you so much, Paul.
I'll try this
    I'll try this
Please Log in or Create an account to join the conversation.
        Moderators: Paul Gilman    
 
  
 















