With HOOPS Publish, you can create interactive documents with separate data and view layers.
For instance, data can be stored in a data table, which can be bound later to widgets like a scroll table or a list box.
The relationship between different data tables can also be used to define dynamic behavior inside a PDF to update what's displayed in a widget whenever a particular event (such as a mouse-click selection) occurs elsewhere in the PDF.
The following sections describe more specifically how this works.
Creating a Data Table
A Data Table is a table data structure that stores an array of pointers to A3DUTF8Char strings:
It can be used to store content to be displayed in any field or high-level widget: text fields, list boxes, buttons, scroll tables, etc.
To display the following items in a list box, define a table with five rows:
The content displayed in a particular widget can change depending on the selection on another widget. In this example, the information displayed in the Required Parts list box is updated depending on which item is selected in the Procedure Steps list box.
In this case, Table 2 is used to define all the content that can potentially be displayed in the Required Parts list box.
Setting a relationship between tables
In the previous sample, clicking on an item in the Procedure Steps widget dynamically populates the data in the Required Parts listbox.
To define that, a relationship table must be set:
This table will define a relationship (a data mapping) between Table 1 and Table 2, describing what will be displayed from Table 2 whenever an item in Table 1 is selected:
Binding a data table
Once the data tables have been created, they need to bind to widgets that are used to display their content. This is done using BindToTable functionality, which can be applied to:
Defining a widget behavior on interaction
Finally, a behavior type must be defined to describe how widgets will be updated when an item is selected in another source widget. In the following example, the data in the Required Parts listbox will be updated after a Procedure Step is selected. To choose if the relevant data (as defined with the Data Relationship table) will be isolated (Fig 1) or highlighted (Fig 2), the function A3DPDFWidgetSetTargetBehaviour must be used:
Three types of behaviour can be defined:
For a working example of how interaction between 3D annotations and the documents can be set up, please see the DemoDataModel sample (only available for HOOPS Publish Advanced customers).