Presenting Data
To present data and calculated results, FlexPro offers you the following presentation objects: 2D and 3D Diagrams, Column, Row and Cell Tables, Text and Media. You can either export these objects directly or insert them in documents and worksheets.
Presentation objects have a definable fixed size corresponding to a rectangular area that the object adopts when it is placed into a document, for instance. However, if you open a presentation object in its own window, then its size is automatically adapted to fit the size of the window when you enable the appropriate option.
Presentation and Document Templates
You can create templates for diagrams, tables, texts and documents and store these in the current project database or in a template database. You can then choose a previously saved template in the various wizards for creating objects.
You can embed or link diagrams, tables, text and media in document templates. Linked objects are replaced by the selected objects when the template is used at a later date. The links in the template serve as placeholders for the diagrams, tables, text and media to be inserted. For embedded presentation objects, however, the data links are replaced. If a document template contains an embedded diagram with two curves, for instance, then the selected data objects are entered in the curves when the template is used.
FlexPro makes a distinction between static and dynamic table and diagram templates. If you use a dynamic template, then a curve or a table column or table cell is created for each selected data set. In a static template, only the existing curves, columns or cells are linked to the selected data objects. Excess data objects, if present, are ignored. You define the type of template when saving it.
Linking and Embedding
You can embed presentation objects into documents and worksheets or insert a link to a project database object. An embedded object is a component of the document or worksheet and can only be used in the location where it has been inserted. Links to embedded objects cannot be created.
If you would like to use the same object in several places, such as in a document and in a worksheet, then you have to set it up in the project database and insert a link to it at the points where it is to appear. When selected, linked objects are displayed with a dashed border and embedded objects are displayed with a solid border.
If you edit an object with links to it, then the changes affect all links. Updating various links does not take place automatically, but instead must be activated using the Update command. The exception here is the size of the object. You can set the dimensions for each link individually. A diagram can therefore be displayed, for example, in a different size in the worksheet than the size in the document.
Not only can you insert links into FlexPro documents and worksheets, but you can also insert them into documents you created using a different application. For example, you can insert a link to a diagram into a text document. Your word processing program just needs an OLE interface. You can also update and edit these links.
You cannot embed presentation objects in external applications, because the FlexPro objects can only be used practically within the environment of the data and analyses on which they are based. However, you can embed a static representation of the object. This then only consists of the image information and cannot be edited subsequently with FlexPro.
Drawing in Presentation Objects
You can insert any number of drawings into all presentation objects except the text object in order to highlight or label interesting parts of a curve, for instance. You can use the same set of shapes as in a document. All drawings that you create within a presentation object appear in the foreground. If you enlarge a diagram, the drawing will automatically be enlarged as well.
You can display drawing grids and use alignment guides to help you with your drawing.
Updates multipage diagrams, tables and texts selected.
FlexPro can split 2D diagrams, column tables, row tables and text over several pages in a document. You can use this option, for instance, to display longer continuous curves in a diagram, to display larger data sets in table, or to display longer text.
In a 2D diagram, page splitting and numbering depends on the options selected on the Page Splitting tab of the Properties dialog box for the diagram. For a column table, the space available on the first page is used and then wraps automatically onto the additional pages if not all of the data can be displayed.
You can place the diagram, table or text on any page in the document. The additional pages automatically appear at the same position on the subsequent pages of the document. The number of pages in the document is automatically adjusted by FlexPro so that all pages of the presentation object are displayed. You can adjust the position of the object for each page. In the case of a multipage table or multipage text, you can also set the height of each page individually.
Note: You can only display entire multipage tables, diagrams and text in FlexPro documents and in the object window. In the worksheet or external applications, only the first page is displayed.
Embedded FPScript
On the Data tab of the Properties dialog box for presentation objects, specify the path name of the formula or data set providing the data to be displayed, for instance, as a curve in a diagram. The easiest thing to do is to specify only the name of the data set. However, if you prefer, you can enter any FPScript expression. This embedded FPScript is then interpreted as a formula located in the same folder where the presentation object is also located.
The following FPScript expression can be used, for instance, to display the last signal of a signal series as a curve:
SignalSeries[-1]
To work with the FPScript expression, FlexPro dynamically creates a formula embedded in the presentation object, which is then compiled and executed. This formula, as with standard formulas, has the properties such as the following: UnitY, UnitX, UnitZ, CommentsY, CommentsX, and CommentsZ. FlexPro attempts to create relevant entries for these properties automatically by taking these from the last data object used in the formula. In the example above, this would be the Signal Series data set. For the most frequent situation where the embedded FPScript only accesses a data set, this provides the correct entries, such as for axis labeling. If this is not the case, you will have to correct the relevant property by write-accessing it. The following FPScript, for instance, normalizes the data of a signal to 100% and corrects the Y comments accordingly:
This.CommentsY = "Normalized Signal"; Signal / Maximum(Signal) * 100.
An embedded FPScript, however, is not used only for accessing data for presentation, but is also used to access attributes that are to be displayed as an axis label or in a table cell, for instance. To do this, use a formatter that has an embedded FPScript expression appended to it in the relevant text. This type of formatter always starts with a % sign and determines how the data is to be presented as well as from where the data originates. A table cell that displays a maximum value could, for instance, contain the following:
Maximum of %{Signal.CommentsY}: %&{Maximum(Signal)}
Here, two fields are embedded in the text. The first field contains an FPScript expression that supplies the commends of the data set, and the second calculates the maximum. The part of the field before the curly bracket '{' with a % sign is also called the Formatter, which controls the output format. The & character in the second formatter specifies, for instance, that the data should be output with the unit. Depending on the format selected, additional codes appear after the % sign.
By default, the following text is entered on the Axis Labeling tab for the axis of a 2D diagram:
%{.Data.YValueObject(%<ListElement>).NameOrQuantityOrComments(.Data.YComponent)}
Before the FPScript code is compiled, the %<ListElement> placeholder is replaced by the number of the curve that is currently being processed if the curve displays a list with several data sets. The FPScript expression uses the curve's Automation object model to access the attributes of the data object that is used for the curve's Y component. To be more precise, the embedded FPScript formula specified for the Y component of the curve is being accessed. This in turn usually takes the attributes from the data object to which it refers.
See Also
Exporting Presentation Objects, Documents and Worksheets
Exporting Presentation Objects, Documents and Worksheets as a File
Exporting Presentation Objects, Documents and Worksheets with OLE
Working with Presentation Templates
Creating a Presentation or Document Template