Using References to Share Data

Top  Previous  Next

References allow you to create connections between blocks on the same page (or a different page), without creating a direct Link between the blocks.

A ReferenceHub is used to pass data to one or more ReferenceTargets. The ReferenceTarget can be on the same page or on another page. When used on the same page, ReferenceHubs and ReferenceTargets can reduce the clutter on the page by reducing the number of links.

A ReferenceHub can accept data from any other programming block on the page. The ReferenceHub sends the data to a ReferenceTarget with the same TagName. The data is passed from the ReferenceTarget to another programming block by a link.

Data from a ReferenceTarget can be accepted by a block with any type of slot. For example, a programming block with only digital input slots can accept numerical data from a ReferenceTarget. Catalyst will automatically convert the data between slots as described in Add Links Between Program Blocks.

ReferenceHubs and ReferenceTargets do not need to be created at the same time. You could create several ReferenceHubs, and later associate the ReferenceTargets to the Hubs.

To create and associate a ReferenceTarget and ReferenceHub:

1

1.In the Toolbox expand the category ‘Tools’.

2.Click and drag a ReferenceHub onto a page. Note the TagName of the ReferenceHub. The TagName is displayed in the Properties area.

3.If you wish, enter a more descriptive label for the TagName.

4.Link the ReferenceHub to the programming block that will supply data.

5.Go to another page. Click and drag a ReferenceTarget onto the page.

6.Click the SmartTag on the ReferenceTarget.

7.In the TagName box, click the drop down arrow. Select the ReferenceHub TagName.

8.Click the page to close the Slot menu. The ReferenceTarget will display the TagName of the ReferenceHub.

9.Similarly, place any other ReferenceTargets required. A ReferenceHub can supply data to multiple ReferenceTargets.

To check the connection between hub and target:

2

Select the ReferenceTarget. Click the SmartTag. In the Tasks menu, click ‘Go to Source’. If the hub and target are properly linked, the page containing the ReferenceHub will open and the ReferenceHub will be selected.

— Or —

Build and deploy the project. Run the project in debug mode. The links will display data sent to the ReferenceHub and from the ReferenceTarget.