# Function Blocks Toolbar

A number of essential tools are included in a row of buttons along the top of the [Function Blocks](https://docs.intrepidcs.com/vspy-3-documentation/3.9.12/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks) area (Figure 1). These tools allow you to add function blocks, remove them, and perform other important operations.

![Figure 1: Function Block Toolbar buttons.](https://2280262322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3KyOmcYmM6ZVd3OQDa1%2Fuploads%2F57BGwvVJl9lXg1HtZWVN%2Ffunction_block_toolbar.gif?alt=media\&token=5f6264ca-375e-4d61-814a-e5520d6c8e66)

### Function Block Controls

Table 1 illustrates and explains the toolbar controls seen in Figure 1.

**Table 1: Function Block Toolbar Controls**

<table><thead><tr><th width="150">Button</th><th width="150">Icon</th><th>Description</th></tr></thead><tbody><tr><td>Add Block</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_add.gif" alt=""></td><td>Displays a submenu that allows you to add a new function block to the current setup. See below for details.</td></tr><tr><td>Delete Block</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_delete.gif" alt=""></td><td>Deletes the function block currently selected in the <a href="function-block-list">Function Block List</a>. Vehicle Spy must be offline to delete a block.<br><br><strong>Note:</strong> Be sure you remember to choose the block you want to delete before pressing the delete button.</td></tr><tr><td>Cut Block</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_cut.gif" alt=""></td><td>Copies the currently-selected function block to the Windows Clipboard, and then removes it from the list. Vehicle Spy must be offline to cut a block.</td></tr><tr><td>Copy Block</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_copy.gif" alt=""></td><td>Copies the currently-selected function block to the Windows Clipboard without removing it.</td></tr><tr><td>Paste Block</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_paste.gif" alt=""></td><td>Pastes a new copy of a function block previously added to the Windows Clipboard via the <strong>Cut</strong> or <strong>Copy</strong> buttons.</td></tr><tr><td>Undo</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_undo.gif" alt=""></td><td>Reverses the last <strong>Cut</strong> or <strong>Delete</strong> operation.</td></tr><tr><td>Disable Filter</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_disable_filter.gif" alt=""></td><td>Clears any filters that have been entered into various columns in the <a href="function-block-list">Function Block List</a>.</td></tr><tr><td>New Form</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_new_form.gif" alt=""></td><td>Allows you to create a new Function Blocks window.</td></tr><tr><td>Import</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_import.gif" alt=""></td><td>Opens a file selection dialog box where you can select a previously-saved function block to import into the current setup.</td></tr><tr><td>Export</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_export.gif" alt=""></td><td>Allows you to save a function block using a <strong>.vs3fb</strong> extension so it can later be imported into Vehicle Spy.</td></tr><tr><td>Find</td><td><img src="https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_find.gif" alt=""></td><td>Opens a small window that you can use to search within the contents of function blocks (see below).</td></tr></tbody></table>

**Note:** The **Add**, **Delete**, **Cut**, **Copy**, **Paste** and **Undo** commands are also available in a right-click menu in the [Function Block List](https://docs.intrepidcs.com/vspy-3-documentation/3.9.12/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-block-list).

### Adding Function Blocks

To add a new function block, click the ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_add.gif) button at the far left of the toolbar. A small submenu will appear, as shown in Figure 2. Select the type of function block you want to add, and it will be added to the function block list with a default name (which you can customize).

![Figure 2: Add Function Block submenu.](https://2280262322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3KyOmcYmM6ZVd3OQDa1%2Fuploads%2F4L8HQe13efguck4AUeb1%2Ffunction_blocks_add_submenu.gif?alt=media\&token=666e7269-f585-4e8a-ae33-0cfca36ef3b0)

### Searching Function Blocks

If you click the ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_find.gif) button, Vehicle Spy will pop up a small dialog box to allow you to search for arbitrary text in any of your defined function blocks. At first, this dialog will only have a text box where you can enter the string to be found, with a blue arrow button you can click to start the search. Each press of the search button will display the next occurrence of the search string.\
\
Press the ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/fb_toolbar_+.gif) button next to the word **Options** to expand the box,revealing more options as shown in Figure 3.

![Figure 3: Search Function Blocks dialog box.](https://2280262322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3KyOmcYmM6ZVd3OQDa1%2Fuploads%2FMEag3yYoogpsHwcdYudR%2Ffunction_blocks_search.gif?alt=media\&token=1b460f82-4111-48ac-8b57-01c08f3344fc)

The options are fairly self-explanatory, especially to anyone who has experience using a word processor:

* **Search Selected Block:** Vehicle Spy will only search the highlighted function block, as opposed to looking through all of them.
* **Case Sensitive:** Vehicle Spy will perform a case-sensitive search on the selected string.
* **Whole Word Only:** When checked, only whole words matching the string will be found; otherwise, partial matches will be included.
* **Direction:** Determines whether the search is done up or down through the function blocks.

Press the ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/fb_toolbar_-.gif) button to hide these options, or click ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_find.gif) again to hide the entire search box.
