# SideCarTool

Use SideCarTool to store a Spreadsheet job result in a simple file extension, like .txt, .html, or .xml. A Sidecar file can act as input for various functions, such as WriteData and WriteImage.

Note: Before you can start using the tool, you have to create both a Sidecar directory on the vision system, and a Sidecar template file inside the folder.

## SideCarTool Inputs

Parameter | Description
--- | ---
String | A file path pointing to the Sidecar template file on the device.
Event | An external event that forces an update. Must reference the AcquireImage function, an Event structure, or a button function.

## SideCarTool Outputs

Returns | A Sidecar file that you can use as input for various other functions.

## Using the SideCarTool

1. Create a Sidecar template file. Reference cells as {$<cell location>}.

2. Create a Sidecar directory on the vision system and copy the Sidecar template file to this location. Make sure to spell the name of the directory as Sidecar. For more information on file and folder management, see How to View Files Stored on In-Sight Device.

3. Add the SideCarTool function to the Spreadsheet, and reference the Sidecar template file.

4. Fill the referenced cells in the Spreadsheet with strings you want to include in the Sidecar file. You can use the expression Stringf("Text").

5. Add the WriteData tool to the Spreadsheet.

6. Reference the SideCarTool in the Data row, and fill out the other required parameters. For more information on the WriteData function, see WriteData.

7. Trigger the SideCar and WriteData tools.

8. The vision system creates the Sidecar file in the Sidecar folder.