Overview |  |  |  |

| This topic describes SAM 3.0 and has not been revised for SAM 2009 Beta. You may find useful information, especially if you are new to SAM, but some of the information may be inconsistent with the new version.

A CapturedFrom variable is an input variable whose value Solar Advisor imports from a cell in an external workbook. A Captured From variable is indicated in the Solar Advisor user interface by a text box with a yellow background.

A SentTo variable is an input variable whose value Solar Advisor exports to a named cell in a workbook. You can view a list of Sent To variables in the current case by clicking SentTo variables on the View menu.

A UDV, or user-defined variable, is a variable that you can create to store values in Solar Advisor and to enhance analyses involving external spreadsheets. Solar Advisor allows you to create one or more user-defined variables on each input page. The software stores values of user-defined variables but does not use them in any internal calculations. You can connect user-defined variables, like other input variables, to external spreadsheets. For example, you could use a user-defined variable connected to an external spreadsheet to convert units of input variables. You could also use user-defined variables to pass values between an external spreadsheet-based cost or performance model and Solar Advisor.

Keep the following points in mind when working with external workbooks and user-defined variables:

• | When Solar Advisor calculates results, it keeps a copy of the spreadsheet open in the background and actively exports and imports values during calculations. If a Solar Advisor calculation changes the value of a Sent To variable and Excel uses the value of that Sent To variable to calculate a Captured From variable's value, Solar Advisor will display results based on the correct value of the Captured From variable.

• | Solar Advisor uses the folder Workbooks to store external spreadsheets. Before connecting Solar Advisor to an external spreadsheet, place a copy of the spreadsheet in the Workbooks folder. The folder is located in the Solar Advisor folder, which by default is C:\SAM.

• | Sent To and Captured From variables can not be defined as parametric variables.

• | User-defined variables (UDV) can also be defined as parametric variables.

• | Solar Advisor can only work with Microsoft Excel Workbooks, not with spreadsheets created by other programs.

• | Before using Excel to edit values or formulas in a workbook that is connected to Solar Advisor, close Solar Advisor.

One simple application for an external workbook is to convert units of an input variable. For example, Solar Advisor requires you to enter fixed operation and maintenance (O&M) costs on the Costs page as a function of system capacity in dollars per kilowatt per year, and variable O&M costs as a function of annual system production in dollars per kilowatt-hour. In the solar power literature, O&M cost estimates are sometimes given as a percentage of total installed costs per year. In the following procedures, we will use Excel to calculate a value for the fixed O&M input variable using a user-defined variable to store the percentage of installed costs value, and the two input variables for array size and total installed costs.

The following procedures describe how to link Solar Advisor to an Excel workbook using the Standard PV Systems.sam sample file and a simple spreadsheet included with in the software's installation package. You can either follow the steps to create your own file, or open the sample file Workbook Example.sam, which contains a set of defined Sent To, Captured From, and user-defined variables that you can use for reference. The overall steps are:

A. Review the External Workbook.

B. Define the Captured From variable (import values to Solar Advisor from an external spreadsheet)

C. Create a UDV (user-defined variable)

D. Define the Sent To Variables (export values to an external spreadsheet from Solar Advisor)