Snippets

The Snippets section lists snippets uploaded to the Management Console repository. When a schedule runs, the robots linked to it are executed on RoboServer. Some robots use snippets that must be available in the repository in the same project as the robot.

When you upload a snippet to the repository, it is copied into the repository. Thus, if changes are later made to the snippet in Design Studio, it needs to be uploaded again. As each snippet name must be unique within each project, multiple snippets with the same name can be uploaded only if they are placed in separate projects.

At the top of the Snippets section, in the Projects drop-down list, you can select the project with snippets to display. You can change the way the information for each snippet is presented as follows:

  • Filter the list of snippets in the table by applying filters in the Filter text field. See Filtering for more information.
  • Select the table columns to display for a snippet using the menu icon on the right.
  • Refresh the displayed information by clicking the refresh icon on the right.

By default, the following table columns are displayed for each snippet.

Name

Description

Folder

Name of the folder specified to store snippets. By default, the files are stored in the Root folder. You can create a new folder to store the files, and the folder name must be unique. The folder name is displayed in the column if the selected folder is other than Root. When deleting a snippet, you can delete an empty folder.

Name

Name of the snippet.

Project name

Name of the project the snippet belongs to (useful when viewing all projects).

Input types

Types used in input variables in the snippet. To use this snippet in a robot, the .type files corresponding to each of these types must be present.

Returned types

Types of values returned by the snippet. To use this snippet in a robot, the .type files corresponding to each of these types must be present.

Stored types

Types of values stored in a database by the snippet. To use this snippet in a robot, the .type files corresponding to each of these types must be present.

Snippets used

Name of the snippets used by this snippet. If a snippet uses snippet A and snippet A uses snippet B, only snippet A is listed here.

Size

Size of the snippet in bytes.

Created by

User name of the user who first uploaded the snippet.

Commit message

Summary describing the commit.

Revision number

The number of the snippet revision.

Last modified

Timestamp for the last change of this snippet.

Optional Columns

Modified by

User name of the user who last modified the snippet.

Imported by

User name of the user who imported the snippet that is part of the imported project or restored backup.

Imported at

Date of the importing of the snippet that is part of the imported project or restored backup.

Upload Snippet

  1. To add a snippet, click the plus sign in the upper left corner.

    The "Upload Snippet file" dialog box appears.

    Also, snippets can be implicitly uploaded from Design Studio. This happens when you use Design Studio to upload a robot that uses the snippet. As Design Studio knows about the dependencies between robots and snippets, it always uploads the necessary snippets along with the robot.

  2. Click the paper clip sign to select a snippet file to upload, select the file on your computer, and then click Open.

    • If you are uploading a snippet with the same name as an existing one, select Override if exists to replace the existing snippet.

    • Select the folder to upload the snippet. By default, all files are stored in the Root folder.

    • In the Commit message field, you may add a description for the commit.

  3. Click Submit.

    The snippet appears in the table.

Additionally, you can perform the following actions on snippets from the context menu:

  • Set folder: Change the folder where the snippet is located.
  • Download: Download a copy of the snippet to your computer.

To remove a snippet, select it in the table and click the bin icon in the upper left corner. You are prompted to confirm the deletion. If the snippet is used by a robot or snippet, the confirmation message includes the usage count. If you delete a snippet that is used by a robot, the robot will no longer be able to execute. When deleting a snippet, you can delete an empty folder.