Working with the Output Panel

CodeSmith Explorer will automatically display the output panel when you click the Generate button. You can also display it by clicking the Expand (>>) button. This action changes the Expand button into the Collapse (<<) button and displays the output panel.

The output panel has two tabs at the top. The Compiler Output tab shows the result of CodeSmith compiling the template. If there are any errors shown in this tab, you need to fix the errors by editing the template before you can generate code with the template. The Template Output tab shows the actual generated code. This tab will be blank until you click the Generate button.

The output panel has its own toolbar with seven buttons:

  Open Template. Opens a File Open dialog box to let you select any CodeSmith template to open in the current window, replacing the template that is currently open.

  Compile Template. Invokes the CodeSmith compiler to check the template for syntax errors. The output from the compiler will be shown on the Compiler Output tab of the output panel.

  Copy Template Output. Copies the current contents of the Template Output tab of the output panel to the Windows clipboard.

  Save Template Output. Opens a Save As dialog box to let you save the current contents of the Template Output tab of the output panel as a new disk file.

  Copy CodeSmith Project. Copies the settings from the property sheet into a CodeSmith Project and to the Windows clipboard as an XML file. CodeSmith Project files can be used as input to the CodeSmith console application.

  Save CodeSmith Project. Opens a Save As dialog box to let you save the settings from the property sheet as an CodeSmith Project file.

  Load CodeSmith Project. Opens a File Open dialog box to let you select an existing CodeSmith Project file. The settings from the XML file will be loaded into the property sheet.