Working with More than One X-Pert Graphics Item Simultaneously

If you want to operate with more than one X-Pert Graphics object or slide at a time, the script engine allows you to group your desired items via the List commands. The Program Script Task has two types of list commands – for grouping of objects and for managing already grouped objects.

Create Lists of Items

The program script engine allows you to operate with several items together via the List variables. In order to do that, first, you need to define a set of objects or slides to belong to a certain list. For this purpose, you can use the available List commands, which are situated within the [TTBProject] and TTBSlidesManager classes:

ObjectsList – This command is situated in [Classes -> TTBProject] in the Browser Area. It lists all the objects in the project and you can choose which objects you wish to keep in the list, with which you are going to operate.

TagsList – This command is also situated in [Classes -> TTBProject] in the Browser Area. It lists all objects that share the same tag. You can read more about Tags in X-Pert Graphics in the relevant section above.

TasksList – This command is also situated in [Classes -> TTBProject] in the Browser Area. It lists all tasks in your project.

SlidesList – This command is situated in [Classes -> TTBSlidesManager] in the Browser Area.It lists all slides in your project.

DataProvidersList – This command is situated in [Classes -> TTBProject] in the Browser Area. It lists all the objects in the project and you can choose which objects you wish to keep in the list, with which you are going to operate.

Manage Lists of Items

Once you have grouped your desired items via one of the List commands, described above, you can work with these groups within your script. There are three List functions, available in the script engine, [PlayList], [StopList], and [ToggleList]. All of them are situated in [Functions  X-Pert Graphics].

Please, check Example 3, Example 6, Example 7, and Example 9 in Appendix 7 below to see how to use the X-Pert Graphics List commands in practice.