Hi Soheb,
The system_to_grid variable is an array, so you should use VBASSCDataGetArray() instead of VBASSCDataGetNumber().
If you want to calculate the annual value of system_to_grid, you can add up the values in the array. The length of the array is determined by the simulation time step and the analysis period. For example, an hourly simulation with analysis_period = 25 would result in an array with 8760 hours/year * 25 years = 219,000 values. You could add up all 219,000 values to calculate the total value over the analysis period, or add up the first 8760 values to calculate the total for the first year.
The SSC guide available from the link on
sam.nrel.gov/software-development-kit-sdk.html provides a reference to many of the SSC functions. The arrays for reading and writing to arrays are described in Section 3.7.2. The guide describes the functions as they are implemented in C. You can use the function definitions in the .bas file that SAM's code generator creates to see how the C functions are translated into VBA.
Best regards,
Paul.