Library Reference

A PowerGREP Library is a convenient place to store PowerGREP file selections, actions, and sequences for later reuse. You can open and save libraries on the Library panel in PowerGREP. In the default layout, you can access the library panel by clicking on its tab just below the menu bar.

Library

To add an file selection to the library, use the Add to Library item in the File Selection menu or File Selection toolbar. To add an action to the library, use the Add to Library item in the Action menu or Action toolbar. To add a sequence to the library, use the Add to Library item in the Sequence menu or Sequence toolbar. You don’t need to save the file selection, action, or sequence before adding it to the library. A copy of the entire file selection, action, or sequence definition is stored in the library file itself.

While the Save item in the Action menu saves a .pga file that includes both the file selection and the action definition, the Add to Library item in the Action menu only adds the action definition itself. To store both the file selection and the action in the library, use the Add to Library item in both the File Selector and the Action menus.

When you open a library, you will see a list of one-line descriptions of all the items in the library. The icon next to each item indicates whether it is a file selection, action, or sequence. Click on an item to make PowerGREP show the complete description along with a summary of the item itself. This is the main advantage of storing file selections, actions, and sequences in a library rather than saving them into separate files. You can easily seek out the item you want to use by comparing the descriptions.

To reuse a file selection, action, or sequence from the library, click the Use button on the Library toolbar. If you selected a file selection, it is copied to the File Selector panel. If you selected an action, it is copied to the Action panel. If you selected a sequence, it is copied to the Sequence panel. All settings on the destination panel are completely replaced with those of the item from the library.

If you use an item from the library and then edit that item on the File Selector, Action, or Sequence panel, the item stored in the library is not automatically updated. You can adapt items you used from the library to the situation at hand without messing up your carefully collected library. If you do want to update the item in the library, you can use the Add to Library menu item in the File Selector, Action, or Sequence menu again. If you didn’t change the description on the Action or Sequence panel, PowerGREP will ask you if you want to replace the action or sequence already in the library. If you did change the description, the new action or sequence is added to the library alongside the old action or sequence. Alternatively, you can update the item by reselecting it the library and using the Update Item command in the Library menu. This updates the item without any prompting and changes the item’s description if you changed it on the Action or Sequence panel.

If you want to add an action from the library to the sequence you’re preparing on the Sequence panel, use the Use Item in Sequence command in the Library menu. This appends the action to the sequence. You can also combine multiple sequences. Load the first sequence into the Sequence panel. Then select the second sequence in the library and use the Use Item in Sequence command in the Library menu. This appends the sequence to the one on the Sequence panel instead of replacing it.

PowerGREP automatically and regularly saves library files. You only need to use the Save item in the Library menu or the Save button on the Library toolbar when you want to save a copy of the library under a new name, or when you want to give a new library a name.

Library files are automatically synchronized between multiple instances of PowerGREP. If you open the same library in two or more instances, any modifications you make to the library in one instance will automatically appear in all other instances. There is no risk of data loss when you edit a library in more than one PowerGREP instance at the same time.