Script extensions can be used to create custom checkpoints. At that, you can store the files, images or objects used by these checkpoints in the project’s Stores. However, adding an item to one of the Stores collections is only possible if the project contains the Stores project item and the corresponding collection (Files, Regions or others) exists in Stores. The
Stores object lets you check whether the current project contains the needed collection, and, if needed, add the desired collection programmatically.
The following example demonstrates how you can make use of the
Stores object. It ensures that the current project contains the Stores | Files collection and after that adds the C:\Report.txt file to it.
if (Stores.Exists("Files") || Stores.Create("Files"))
If Stores.Exists("Files") Or Stores.Create("Files") Then
Files.Add "C:\Report.txt", "Report"