In this section, the concept of producing diagrams in EASAPs will be discussed in detail. Each TABBED PANE of an EASAP can contain a Diagram Region. A DIAGRAM in the EASAP Builder specifies the content to be displayed in the Diagram Region.
Diagrams can consist of lines, shapes, colors, text and even imported images. These various components are created using DIAGRAM's Child objects on the EASAP Tree.
The diagram example below shows line drawings for the side and end view of a cyclone separator. In addition, a dimension line is present to highlight the currently selected dimension input.
The main purpose of an EASAP DIAGRAM is to provide useful feedback to users. A DIAGRAM may be coupled to user inputs through use of expressions. When implemented, a DIAGRAM will dynamically change its display in response to user inputs.
|ARROW||Creates an arrow with dynamic coordinates.|
|CURVE||Creates a curve through a series of plot points.|
|DATA PROCESSING||A Parent under which all the available data processing tools reside.|
|DIMENSION||Produces a special set of lines for illustrating a dimension.|
|IMAGE||Displays image files in the Input Region of a TABBED PANE.|
|LINE||Creates a series of connected line segments.|
|OVAL||Creates an ellipse or circle.|
|POLYGON||Produces a polygon on a diagram.|
|RECTANGLE||Defines a rectangle.|
|SECTOR||Creates a sector, i.e. ‘pie slices’, of a circle.|
|TEXT||Annotates a diagram with text.|
DIAGRAM's make use of settings in STYLE's for properties such as line thickness, line color, fill color, orientation, etc. All new EASAPs contain several pre-defined STYLE's to immediately create a DIAGRAM. If the existing STYLE's don't meet the Author's requirements, more STYLE's can be added to the Tree under:
Tip: Make use of the Copy and Paste functions to quickly create new STYLE's from those predefined under STYLE LIST.
Another type of DIAGRAM that can be created for use in an EASAP is a 2D GRAPH. There are two types of 2D graph:
|2D GRAPH||Creates plots from data stored within LIST's.|
|CONTOUR DATA||Specifies contour data to be plotted on the 2D GRAPH.|
|LEGEND||Activates a legend on a graph.|
|LINE DATA||Specifies line data to be plotted on the 2D GRAPH.|
|TITLE||Used to specify the main and sub titles of the 2D Graph object.|
|X AXIS||Used to specify the properties of the horizontal axis of a 2D Graph object.|
|Y AXIS||Used to specify the properties of the vertical axis of a 2D Graph object.|
Expressions are often required in setting the parameters of a DIAGRAM. For the various Origin:, Size: and Points: parameters, these expressions can get quite long and complex. Two straightforward remedies will shorten or even eliminate these expressions:
For the first method, create a COMPUTE within a DATA PROCESSING somewhere on the USER INTERFACE branch containing an expression defining the commonly used coordinate. Reference this COMPUTES’s name in expressions found in the Origin:, Size: and Points: parameters within DIAGRAM's.
Note: The stored value in the COMPUTE does not have to represent a complete expression of a coordinate found in a DIAGRAM's parameter, but instead might represent a partial result shared in common within other expressions.
For the second method, create multiple separate LIST's. One for the X coordinates, another for the Y coordinates, and possibly a third for the Z coordinates. These LIST's might be created by reading them from a file using EXTRACT, REPEAT and FIND. Next combine the three LIST's into a single INTERLEAVE. Finally, enter this INTERLEAVE in the Points: parameter of one or more DIAGRAM's.
Now that all the DIAGRAM Child objects have been introduced, there are a number of useful details to assist one in creating DIAGRAM's.
DIAGRAM Child objects are rendered in the order they appear on the EASAP Tree. In other words, DIAGRAM Child objects at the top of the Tree get rendered before objects located near the bottom. This point is important since opaque objects (Transparency: equal to 1.0 in FILL STYLE) may ‘cover over’ objects preceding them on the EASAP Tree. Thus, top-to-bottom positioning the Tree equates to background-to-foreground rendering in the EASAP.
Tip: Shapes such as Rectangles, Ovals or Polygons can be used to highlight other objects by using a semi-transparent Fill Style and placing the highlight object ‘over top’ the other objects. Again, the highlight object must be located lower on the tree than those objects being highlighted.
A powerful way to provide context sensitive feedback to users of an EASAP is to use conditional display of diagram objects using the Show if: parameter. The Show if: parameter must be set using a logical expression. If the expression evaluates to a value of ‘True’ then the object is displayed. Conversely, if the expression evaluates to ‘False’, then the object is NOT displayed.
A common usage of the Show if: parameter is to determine display based on a selection from a CHOICE LIST. For example, you can set up different highlight shapes only to appear if a certain selection is made by the user. Let's assume a rectangular highlight over one of the three possible tube patterns. In this example, the logical expression used for the Show if: parameter could be:
where tube is the name for a CHOICE LIST.
The Diagram Region of a TABBED PANE has its layout defined by an ‘Auto-Fit’ algorithm. This algorithm centers the visible DIAGRAM Child objects and scales them to fit within the rectangular area of the Diagram Region.
A DIAGRAM object is dynamic if its size or location is linked to a User input. Once an object is dynamic, the ‘Auto-fit’ feature is applied upon each new input value. However any DIAGRAM objects that have constant size or location will be moved and scaled. As a consequence most DIAGRAM objects will need to be dynamic if any single one is.
Therefore, to make a DIAGRAM completely dynamic, the parameter values will need to use expressions involving data entry object names. Otherwise, if a mix of relative and absolute sizes or locations, may create undesired effects, such as objects with absolute settings ‘flying around’ the screen as other dynamic objects with relative settings are modified in response to inputs from a User.
Since the Auto-Fit algorithm fits and scales only visible objects, diagrams will tend to ‘jump around’ on the screen when objects such as dimension lines have a conditional display based on the current mouse focus. In this case, to stabilize the display of the diagram, use a RECTANGLE as a background in which all other DIAGRAM Child objects will always fit. To create a background, do the following:
In this section, are a couple of miscellaneous tips to help with making a diagram in an EASAP.