Visual TD Diagram Editor User Guide
Visual TD Diagram Editor User Guide
Visual T&D
Diagram Editor
© 2011 Cooper Power Systems, LLC – All rights reserved.
The information in this document is subject to change without notice.
GUI-00115-00021 T, version 12
Contents
Introduction 1
Welcome to Visual T&D Diagram Editor ...........................................................................1
Contacting Cooper Power Systems .......................................................................1
Getting Support .....................................................................................................2
The Basics 3
Overview .............................................................................................................................3
Modes of Operation .............................................................................................................3
Switching Between the Design Mode and the Animation Mode ...........................4
Creating a Diagram ..............................................................................................................4
Setting up the Current Page’s Properties ...............................................................4
Setting up the Current Page’s Grid Properties .......................................................5
The Drawing Toolbar ............................................................................................6
Adding Basic Shapes to Your Diagram .................................................................7
Adding a Line to Your Drawing ............................................................. 7
Adding a Polygon to Your Drawing........................................................ 7
Adding a Rectangle to Your Drawing ..................................................... 8
Adding a Polycurve to Your Drawing ..................................................... 8
Adding a Closed Curve to Your Drawing ............................................... 8
Adding an Ellipse or a Circle to Your Drawing ...................................... 8
Adding a Text Label to Your Drawing ................................................... 9
Adding an Image to Your Drawing ......................................................... 9
Working with Overlapping Shapes........................................................................9
Moving a Shape up in the Stacking Order............................................. 10
Moving a Shape Down in the Stacking Order ....................................... 10
Selecting Shapes ..................................................................................................10
Using the Pointer Tool to Select Shapes ............................................... 10
Using the Selection Tool to Select Shapes ............................................ 10
Selecting Multiple Shapes ..................................................................... 11
Moving Shapes ....................................................................................................11
Use shapes to create diagrams that represent the devices in the substation and how they are
interconnected.
Associate data points with shape display properties and create animated diagrams that
represent the current state of a process.
Create libraries of standard shapes and diagram pages that speed up the substation
configuration process.
Associate shapes with Microsoft ® Visual Basic ® for Applications (VBA) scripts and
implement sophisticated control functions.
Visual T&D Diagram Editor is the companion product to Visual T&D Explorer and is part of
Cooper Power Systems’ Yukon family of products.
Our sales department can assist you with general questions regarding the use of Visual T&D and
with any pricing and licensing issues.
Email: [email protected]
Phone: +1.418.834.0009
Fax: +1.514.227.5256
Email: [email protected]
Phone: +1.418.834.0009
Fax: +1.514.227.5256
Business hours are from 8 a.m. and 5 p.m. EST, Monday to Friday.
Overview
Visual T&D Diagram Editor is a complete drawing program that provides all the tools and
functions required to create high-quality interactive diagrams. If you already have a Windows-
based drawing program, you will immediately feel at ease with Diagram Editor.
In this chapter, you will learn how to use the drawing tools to create shapes that represent the
various components or devices in your diagram.
In the subsequent chapters, you will get acquainted with the more advanced aspects of the program
and learn how to animate the shapes in the drawing according to the values of the data points
provided by the Visual T&D server.
Modes of Operation
Diagram Editor provides two modes of operation.
Design mode.
While you design your diagram, you use the drawing tools and command menus to create
your diagrams.
Unless it is specified otherwise, the instructions and procedures described in this document
apply to the Design mode.
Animation mode.
When the diagram is animated, the program connects to the Visual T&D server and animates
the diagrams according to the values of the data points and the effects you have programmed.
When Diagram Editor is started via Visual T&D Explorer, it automatically enters the Animation
mode.
When Diagram Editor is started via Windows’ Start menu, the user is prompted to enter its Visual
T&D account’s credentials to connect to the server. If the user provides this information and
connects to a server, Diagram Editor enters the Animation mode; otherwise, it enters the Design
If there is a checkmark beside the Run command, Diagram Editor is in the animation mode.
To enter the design mode, click Run.
If there is no checkmark beside the Run command, Diagram Editor is in the design mode.
To enter the animation mode, click Run.
Creating a Diagram
To create a diagram, you use drawing tools to place various shapes and text labels on a drawing
surface. Diagram Editor provides you with an empty drawing surface. You can select the size of
the drawing surface and specify a background color. You can also overlay the drawing surface
with a grid to help you align shapes.
Your diagram can contain one or more pages. Each page itself is a diagram that will either be
displayed in a separate window or occupy the full screen. To learn how to work with multiple
pages, see “Working with Pages”, page 63.
Object Description
Name Specifies the name of the page
Zoom when run Changes the default zoom setting for the page when the diagram is run. You
choose a setting or enter a percent in the box.
The Action tab is explained more in details in section “Adding a New Page or Modifying an
Existing Page”, page 65.
From the View menu, choose Grid. The Grid Properties dialog will appear:
Object Description
Show grid Activates the display of the grid.
Snap to grid Activates snapping so that shape vertices are automatically pulled towards the
diagram grid points.
Angle snap Activates rotation snapping so that shapes can be rotated in fixed increments
only.
Grid spacing Sets the horizontal and vertical grid spacing using pixels.
Tool Description
Pointer The Pointer tool moves or selects shapes and shape vertices.
Selection The Selection tool selects shapes enclosed within a rectangular area.
Edit Vertices The Edit Vertices tool moves individual points in a polygon or polycurve.
Properties The Properties button displays the Shape Properties dialog for the selected
shape.
Line The Line tool draws a line between two mouse positions.
Polygon The Polygon tool draws a closed polygon defined by the points clicked with the
mouse.
Rectangle The Rectangle tool draws a closed rectangle between two mouse positions.
Polycurve The Polycurve tool draws a curved line passing through the points clicked with
the mouse.
Closed Curve The Closed Curve tool draws a closed shape passing through the points clicked
with the mouse.
Ellipse The Ellipse tool draws a circle or ellipse between two mouse positions.
Image The Image tool inserts an image file in the drawing. Supported formats are:
bitmaps (.BMP), icons, (.ICO), Graphics Interchange Format (.GIF) and JPEG.
Connection Point The Connection Point tool inserts a connection point object that is used to
anchor a link between two shapes in the drawing. The connection point must be
grouped with an object.
Link The Link tool draws a line between two connection points. The line is anchored
to the objects and is redrawn if the objects are moved.
Orthogonal Link The Orthogonal Link tool draws a line between two connection points. The line
is composed of horizontal and vertical segments only; it is anchored to the objects
and is redrawn if the objects are moved.
Note: You can set the default shape properties by choosing the Default Properties…
command in the Shape menu.
Press the left mouse button at the starting position of the line.
Tip: Press the SHIFT key before pressing the mouse button to limit the mouse
movement to either the horizontal or vertical direction.
Drag the mouse to the intended position of the diagonally opposite corner.
Tip: Press the SHIFT key before pressing the mouse button to draw a square.
Click the left mouse button at the positions of the successive points of the polycurve.
Click the left mouse button at the position of the successive points of the curve shape.
Note: You must enter at least four points to define a closed curve.
The program draws an ellipse within the boundaries of the mouse movement.
Note: Press the SHIFT key before pressing the mouse button to define a circle.
Drag the mouse to the intended position of the diagonally opposite corner.
Tip: Press the SHIFT key before pressing the mouse button, to draw a square text
label.
Note: Use the Text tab of the Properties command of the Shape menu, to set the text
display properties.
Click on the Image tool on the Drawing toolbar. The program displays a dialog box from
which you can select the image file.
Click the left mouse button to add the image to the drawing.
Note: Use the General tab of the Properties command of the Shape menu to set the
background transparency color.
You manage the order of shapes in the stack by using commands in the Shape menu or buttons on
the Structure toolbar.
Select Bring To Front from the Order command in the Shape menu or on the Structure
toolbar. The object will be brought up to the top of the stack, in front of all others.
Select Bring Forward from the Order command in the Shape menu or on the Structure
toolbar. The object will be brought up one level in the stack.
Select Send To Back from the Order command in the Shape menu or on the Structure
toolbar. The object will be sent to the bottom of the stack, behind all others.
Select Send Backward from the Order command in the Shape menu or on the Structure
toolbar. The object will be brought down one level in the stack.
Selecting Shapes
The Drawing toolbar provides you with two different tools that you can use to select shapes in the
drawing.
Most of the commands in Diagram Editor apply to the shapes selected in the drawing. Selected
shapes are displayed differently, so that you can easily locate and modify them.
Click the tool in the drawing to select the topmost shape at the mouse position.
OR
Click the Pointer tool in an empty area of the drawing and drag the mouse to select all the
shapes within the area.
Click the tool in the drawing, and drag the mouse to select all shapes within the area.
To select new shapes while keeping those that are already selected:
Press the SHIFT key or the CTRL key, and click on a shape to add it to those already
selected.
Press the CTRL key, and drag the mouse in the drawing to add all the shapes in the area to
those already selected.
Press the SHIFT key and click on a selected shape to unselect it.
Moving Shapes
You can use either the mouse or the keyboard to move shapes in the drawing.
Click on the selected shapes and drag them to the desired location.
Use the keyboard arrow keys to "nudge" the selected shape in any direction.
When you use the nudging commands, movement is not confined to the grid.
Note: The nudging commands are also available through the Position command in the
Shape menu and via the Nudge toolbar.
A simple shape, such as a line, is composed of two end points and a single segment. More
complex shapes, such as polygons, are composed of vertices and segments. Rectangles and
ellipses are defined by a bounding rectangle.
Use the Pointer or Selection tool to select the shape you want to resize.
Click on a selection handle and use the mouse to drag the shape to the new size.
Tip: The shape of the mouse pointer changes to indicate the direction in which you
can move the selection handle.
Use the Pointer or Selection tool to select the shape you want to modify.
Select Increase Width or Decrease Width from the Sizing toolbar to enlarge or reduce the
width of the shape by one pixel.
Select Increase Height or Decrease Height from the Sizing toolbar to enlarge or reduce the
height of the shape by one pixel.
Note: The sizing commands are also available from the Size command in the Shape
menu.
When you use the sizing commands, movement is not confined to the grid.
Note: You can also use the keyboard to resize a shape. To do so, select the shape,
then hold down the CTRL key and a keyboard arrow key at the same time. The
top left-hand corner of the shape will remain in the same position, while the rest
of the shape will move in the direction of the arrow until you release the two keys.
Use the Pointer or Selection tool to select the shape you want to modify.
Click on one of the vertices of the shape and drag it to the new position.
Tip: The shape of the mouse pointer changes to indicate a vertex that you can drag.
Rotating Shapes
Diagram Editor provides tools that you can use to change the orientation of a shape.
The Rotate Left and Rotate Right commands change the orientation of the shape in fixed
90° increments.
The Flip Vertical and Flip Horizontal commands flip the shape around either the vertical or
the horizontal geometric axis, to provide a mirror image.
Note: A shape rotates around its center of rotation, which is located at the center of the
shape’s selection rectangle.
Select the Free Rotate command on the Rotation toolbar or in the Shape menu.
Click in the shape and drag the mouse until the shape is at the required angle. The shape will
rotate in 15-degree increments, if you have enabled Angle snap in the Grid Properties
dialog.
Note: The shape of the mouse pointer changes to indicate positions where the rotation
tool can be used to grab and rotate the shape.
Select the Rotate Right command on the Rotation toolbar or in the Shape menu to rotate the
shape 90° to the right.
OR
Select the Rotate Left command on the Rotation toolbar or in the Shape menu to rotate the
shape 90° to the left.
Flipping a Shape
Use the Pointer or Selection tool to select the shape.
Select the Flip Horizontal command on the Rotation toolbar or in the Shape menu to flip the
shape around the horizontal axis.
OR
Select the Flip Vertical command on the Rotation toolbar or in the Shape menu to flip the
shape around the vertical axis.
Select the shapes you want to organize by clicking on the shapes with the Pointer tool while
holding down the SHIFT key. The last shape you select will be used as the reference.
OR
Use the Pointer or Selection tool to select all the shapes in an area of the drawing. The
reference shape will be the topmost shape in the stacking order.
Tip: When you select multiple shapes, you can identify the reference shape by the
selection handles, which are gray instead of white.
Select the Align Left, Align Center and Align Right commands in the Tools menu or on the
Alignment toolbar to align the shapes vertically.
Select the Align Top, Align Middle and Align Bottom commands in the Tools menu or on
the Alignment toolbar to align the shapes horizontally.
Select the Make Same Width command in the Tools menu or on the Layout toolbar to
change the size of the shapes so that they match the width of the reference shape. The left side
of the shapes remains in the same position.
Select the Make Same Height command in the Tools menu or on the Layout toolbar to
change the size of the shapes so that they match the height of the reference shape. The tops of
the shapes remain in the same position.
Select the Make Same Size command in the Tools menu or on the Layout toolbar to change
the size of the shapes so that they match the size of the reference shape. The top left corners
of the shapes remain in the same position.
Select the Distribute Horizontally command in the Tools menu or on the Layout toolbar to
change the position of the shapes so that they are equally distributed between the leftmost and
rightmost selected shapes.
Select the Distribute Vertically command in the Tools menu or on the Layout toolbar to
change the position of the shapes so that they are equally distributed between the topmost and
Grouping Shapes
Your diagrams will most probably contain complex pieces of equipment such as transformers and
alternators. While you can easily draw a transformer with a number of curved lines, it will take
you a long time to create your drawing if you need to represent a large number of similarly
complex shapes.
The Group command creates a new complex shape by grouping simple shapes together. Once
shapes are grouped, you manage the group as if it were a simple shape and you can apply the usual
commands to move, copy, rotate or align shapes.
Grouping Shapes
Note: When you add shapes to an existing group, you create a new group containing
the original group and the new shapes.
Ungrouping Shapes
Select Ungroup on the Structure toolbar or from the Grouping command in the Shape
menu.
Note: When you ungroup a shape that contains groups, only the most recent grouping
is undone and the original groups remain.
Connecting Shapes
Most diagrams are composed of shapes that are connected together by lines to indicate some kind
of relationship. When you use the Line tool to connect two shapes, Diagram Editor has no
knowledge of the relationship between the shapes. If you move a shape, the line is left dangling
and you have to repair the drawing.
When you connect two shapes with the Link tool, the shapes remain connected even when they
are moved.
The Link tool draws a line between connection points. To use the Link tool, you must first add
connection points to your shapes using the Connection Point tool. You then have to group each
connection point to its shape.
Use the Pointer or Selection tool to select both the shape and the connection point.
Select Group on the Structure toolbar or from the Grouping command in the Shape menu.
OR
Tips: The shape of the mouse pointer changes to indicate when you can click on a
connection point.
Use the Pointer tool to select the link between the two shapes.
Use the mouse to drag the selection handles to the required position.
Shape Properties
You can specify how the shapes should be drawn by setting the Properties of the shapes.
Depending on the type of shape, you can set the line drawing properties, the color fill properties or
text drawing properties.
The following table summarizes the drawing properties available for each type of shape.
Polygon √ √ √
Rectangle √ √ √
Polycurve √ √
Closed Curve √ √ √
Ellipse √ √ √
Text √ √ √ √ √
Image √
Connection Point √
Link √ √
Orthogonal Link √ √
The Shape Properties dialog appears. The dialog contains different tabs, depending on the
type of shape you selected.
General Properties
The General tab of the Shape Properties dialog sets the name of the shape and identifies its type.
Note: Shapes created with the Image tool contain additional fields described under
"Image Properties" (below).
Image Properties
The General tab of the Shape Properties dialog contains additional fields when the shape is an
image inserted in the diagram with the Image tool.
Transparency color Indicates the color that is considered transparent. All pixels with this color will be
removed from the image and the background will show through.
Object Description
Color Selects the line drawing color.
Transparent Specifies that the line is to be invisible. Use this attribute to remove the contour
of filled shapes. When you select this field, all other line properties are disabled.
Style Sets the line drawing style. This field is available for 0 point (1 pixel thick) lines
only.
Thickness Sets the line drawing thickness. This field is available for solid lines only.
Transparent fill Indicates that the shape is transparent. All other fields are disabled.
Background color If a hatch pattern is selected, this color will be used to fill the areas between the
lines of the hatching pattern.
Transparent If a hatch pattern is selected, the areas between the lines of the hatching pattern
background will be transparent.
Text Properties
The Text tab of the Shape Properties dialog sets the contents and display properties of shapes
created with the Text tool.
Multiple lines Indicates that the text can be displayed on multiple lines. If you do not put a
check mark, the text will be truncated to the width of the shape.
Automatically If selected, the shape will be automatically enlarged if the text does not fit in the
enlarge the shape to shape.
display text
Word wrap If Multiple Lines is selected, the text will be broken up into multiple lines on
word boundaries.
Vertical alignment Specifies whether the text should be displayed at the top, center or bottom of the
shape.
Font Properties
The Font tab of the Shape Properties dialog sets the display font for shapes created with the Text
tool.
Object Description
Font Selects the name of the font to be used to display the text shape.
Font style Selects the font style: regular, bold, italics or bold italics.
Select the Properties command from the Shape menu. The Shape Properties dialog displays
the tabs appropriate for the grouped shapes.
Change any property and the modification will be applied to all the shapes in the group.
Note: The Shape Properties dialog will not display the correct values if the shapes in a
group have different values for the same properties. However, if you select a new
value, this new value will be applied to all shapes.
Click the Properties button to display the Shape Properties dialog for the selected item.
Once you have completed the diagram to your satisfaction, you can also save it on the computer
on which the Visual T&D server is running. A diagram on the server is available to all the
computers connected to the server.
The Diagram Viewer program automatically loads and displays the diagram stored on the selected
server. With Diagram Editor, you can retrieve the diagram from the server and save it as a file on
your own computer.
Saving a Diagram
To save the current diagram to a file:
Enter the name of the diagram, and select the folder in which you want to save it.
Note: By default, all diagram files are stored in the Diagrams folder, within the Client
folder.
Note: Only users who have been assigned editing privileges can save a diagram file on
the Visual T&D server.
The diagram file will be saved on the server and made available to all computers connected to
Warning: Saving the current diagram to the server overwrites the diagram associated
with the current site configuration.
Note: Diagram Editor can only edit one diagram file at a time. If there already is an
open diagram, you will be prompted to save any changes.
Note: Diagram Editor can only edit one diagram file at a time. If there already is an
open diagram, you will be prompted to save any changes.
Overview
The most important feature of Visual T&D Diagram Editor is its ability to create diagrams that
represent the operation of a process in real time.
In the previous chapters, you learned how to use Diagram Editor tools to create shapes and
diagrams. In the following sections, you will learn how to connect to the Visual T&D server,
access data points and create animated diagrams that change according to the values of these
points.
For each data point, the server provides the following information that can be used to determine
the display of shapes in your diagrams:
The tag name of the data point, which you will use to access the value.
The value of the data point, which you can display or use to control shape properties.
The quality of the data, which indicates whether the data is valid.
The tags, which you use to store status information for each data point. For each data point,
you can store 16 tags that contain a TRUE or FALSE value.
From Diagram Editor, you can connect to the server and retrieve the list of all available data
points. In the program, we refer to these data points as variables. When you design your diagrams,
Animation Effects
All the shapes you create in Visual T&D Diagram Editor have static properties that indicate how
they are displayed in the diagram, their color, the thickness of the lines and their text attributes. A
shape can also have dynamic properties that become active when Diagram Editor enters the
Animation mode.
For instance, you can use a text shape to display either a static label or the results of the evaluation
of an expression. The expression can refer to the value of a variable associated with a data point.
The display of a variable is a very basic animation effect. You can also design more complex
effects, whereby a shape flashes or changes colors if a variable exceeds a threshold. Shapes can
appear, disappear or even be resized according to the results of expressions.
In the following sections, you will learn how to create expressions that refer to variables and how
to use these expressions to create various animation effects.
Animation Basics
Before going into all the details of the various types of animation, we will illustrate how to set up
a very simple animation effect.
Many electrical diagrams include shapes that represent open or closed switches. In the example
that follows, we will create a two-position switch that is displayed in green when open and red
when closed.
In a typical process control system, one or two data points would be used to indicate the state of
the switch. In our example, we will assume that there is a single data point called SW_OPEN that
is TRUE when the switch is open.
Use the Ellipse tool to draw the connection pads of the switch.
Use the Line tool to draw the line in the open position.
Use the Line and Fill tabs of the Shape Properties dialog to set the line thickness and to set
the color to green.
Use the Pointer or Selection tool to select the components of the open switch.
Click in the diagram at the approximate position where you want to copy the shape.
Select the Pointer tool, and move the end point of the line to create the closed shape.
Use the Line and Fill tabs of the Shape Properties dialog to set the color to red.
Use the Pointer or Selection tool to select all the components of the open switch.
Select the Group command from the Grouping selection in the Shape menu.
Use the Properties command in the Shape menu and enter a significant name, such as
"Open", for the grouped shape.
Repeat the above steps for the components of the closed shape and name the group "Closed".
Use the Pointer tool to move both shapes until they overlap exactly.
Use the Pointer or Selection tool to select both the open and closed shapes.
Select the Group command from the Grouping selection in the Shape menu.
Use the Properties command in the Shape menu and enter a significant name, such as
"Switch", for the grouped shape.
After these steps, you should have a group containing two other groups. You can use the Show
command in the Grouping selection of the Shape menu to display the shape hierarchy.
Select the Animation tab from the Shape Properties dialog box.
Enter the following string in the Expression field in order to hide the shape when the data
point indicates that the switch is open:
Enter the following string in the Expression field in order to hide the shape when the data
point indicates that the switch is closed:
NOT(SW_OPEN)
If you want to save the drawing, click Save in the File menu.
Note: Since data point name SW_OPEN does not exist on the Visual T&D server, the
Unresolved Aliases and Nonexistent Variables dialog box will open. Click
Ignore to continue.
From the Animation menu, select Run to clear the checkmark besides this menu command.
In the following sections, we will describe various animation effects that you can use to display
values or modify the display of your shapes in the diagram.
The operations you perform in the dialog apply to the selected shape or group of
shapes.
Animation order Displays the list of animation effects selected for the current shape or group of
shapes.
Add Displays the list of animation effects available for the selected shape. The
program displays a dialog box in which you will specify the animation
parameters.
Edit Displays the dialog box for the selected effect so that you can change the
parameters.
Object Description
Expression Used to enter and edit the expression to be evaluated. You can enter the
expression directly from the keyboard or use the buttons to insert variable names,
arithmetic or logical operators, etc.
Logical and Binary Used to select and enter logical and binary operators in the expression.
Variables and Used to select and enter variable names and aliases in the expression. The
Aliases variables are the data points configured in the server. Aliases are names that are
used when you create generic shapes. Aliases must be associated with variables
before the diagram can be animated. See “Working with Aliases”, page 55.
Arithmetic Operators
You can use the following arithmetic operators in expressions:
Operator Description
+ Calculates the sum of the left and right operands.
1 + 2 * 3 evaluates to 7
(1 + 2) * 3 evaluates to 9
Relational Operators
You can use the following relational operators in expressions:
Operator Description
< Evaluates to TRUE if the left operand is less than the right operand.
> Evaluates to TRUE if the left operand is greater than the right operand.
<= Evaluates to TRUE if the left operand is less than or equal to the right operand.
>= Evaluates to TRUE if the left operand is greater than or equal to the right
operand.
!= Evaluates to TRUE if the left operand is different from the right operand.
You can use the following logical and binary operators in expressions:
Operator Description
Logical AND Evaluates to TRUE if the left and right operands are both TRUE.
Binary AND Calculates a bitwise AND between the left and right operands.
Binary XOR Calculates a bitwise XOR between the left and right operands.
Functions
You can use the following built-in functions in expressions:
Function Description
ABS( x ) Calculates the absolute value of x.
QualityOf( point name ) Evaluates to TRUE if the value of the specified data point
is valid.
TagOf( point name ) Calculates the integer value of all tag bits for the specified
data point name.
TagOf( point name, tag bit x ) Calculates the Boolean value of tag bit x of the specified
data point name.
ActiveTagCountOf( point name ) Calculates the number of tag types currently set for the
specified data point name.
GetTagCount( point name) Calculates the total number of tags currently set for the
specified data point name.
GetTagType( point name) Returns the type of the highest priority tag for the specified
data point. Possible values are: TAG_TYPE_NONE if no
tag exists for the data point,
TAG_TYPE_INFORMATION for an information tag, and
TAG_TYPE_ALL_CONTROL_INHIBITED for a control
inhibition tag.
HasTagFor( point name, type) Evaluates to TRUE if the specified data point has a tag of
type type.
IsAlarmActive( point name, type ) Evaluates to TRUE if an alarm of type type is currently
displayed for the specified data point. If TRUE, you can
use the AlarmStateOf function to determine if the alarm
condition still exists.
AlarmStateOf( point name, type ) Evaluates to TRUE if the alarm condition of type type for
the specified data point still exists. Evaluates to FALSE if
the alarm condition is returned to normal.
GetAlarmPriority( point name ) Returns the alarm priority level for the specified data point.
Constants
You can use the following built-in constants in expressions:
Operator Description
TRUE Represents a logical true value. Any value other than 0
is considered true.
__sys_alarmSoundTriggered Logical point that indicates whether the sound has been triggered. Its
value will be TRUE if the sound is triggered and FALSE if the sound
has not been triggered. (The sound is triggered whenever a new alarm
enters the system.)
You will typically use this effect to display the value of a data point or one of its tags.
When you select this type of effect, you must provide the following parameters in the dialog box:
Expression The expression to be evaluated. The program displays logical values as "True" or
"False", while it displays numerical values with the requested number of decimal
places.
Decimal places Indicates the number of decimal places to be displayed. If you specify 0, there
will be no decimal point.
The result of the effect depends on the type of shape. Shapes with closed areas will be filled with
the selected color. Lines and text will be displayed in the selected color.
You will typically use this effect to display a shape with a special color to indicate that it is active
or that a value has reached a given threshold.
When you select this type of effect, you must provide the following parameters in the dialog box:
Expression The expression to be evaluated. The shape will change colors if the condition
evaluates to TRUE.
You will typically use this effect to display a label or message whenever a data point tag is active
or when a value reaches a given threshold.
When you select this type of effect, you must provide the following parameters in the dialog box:
Expression The expression to be evaluated. The original text label will be replaced with the
new value if the condition evaluates to TRUE.
You will typically use this effect to conditionally hide or display shapes according to the value of
a data point or a tag.
When you select this type of effect, you must provide the following parameters in the dialog box:
Expression The expression to be evaluated. The shape is hidden if the condition evaluates to
TRUE.
You will typically use this effect to indicate a special situation that requires user intervention.
When you select this type of effect, you must provide the following parameters in the dialog box:
Expression The expression to be evaluated. The shape flashes if the condition evaluates to
TRUE.
The Hide effect alternately shows the shape and then removes it from the display.
The Color effect alternately shows the shape in its original color and in the
specified color.
If you specify Fast, the animation takes place once per second.
If you specify Slow, the animation takes place once every 2 seconds.
You will typically use this effect to create sophisticated indicators, such as moving bar charts or
thermometer displays.
When you select this type of effect, you must provide the following parameters in the dialog box:
Object Description
Description Sets the name of the animation effect.
Expression range Indicates the minimum and maximum range of values of the expression.
Scaling range Indicates the scaling that will be applied to the shape, as a percentage of the
current size. A value of 100% represents the original size of the shape, while a
value of 0 makes the shape disappear.
The minimum value indicates the scaling that will be applied when the expression
is equal to or less than the minimum Expression range value.
The maximum value indicates the scaling that will be applied when the
expression is greater than or equal to the maximum Expression range value.
Dimensions to be Selects the dimensions of the shape that will be resized: width or height.
scaled
Anchor point Selects the part of the shape that remains stationary when the shape is resized.
You will typically use this effect to create sophisticated indicators, such as moving slider controls
or moving gauges.
When you select this type of effect, you must provide the following parameters in the dialog box:
Expression The expression to be evaluated. The position of the shape within the movement
area changes according to the value of the expression.
Expression range Indicates the minimum and maximum values of the expression.
Horizontal Indicates whether the shape is to be moved horizontally and if so, by how many
movement range pixels.
Specifies by how many pixels the shape is to be moved when the expression is
greater than or equal to the maximum Expression range value.
Vertical movement Indicates whether the shape is to be moved vertically and if so, by how many
range pixels.
Specifies by how many pixels the shape is to be moved when the expression is
greater than or equal to the maximum Expression range value.
Direction Selects the direction of movement of the shape within the specified area.
Tip: To assist you, the program displays the outline of the movement area on the
diagram while you edit the parameters of this animation effect.
Combining Effects
You can assign any number of animation effects to a shape. In Animation mode, the program
evaluates the expression associated with each effect and performs all applicable animation. Thus,
you can create a shape that changes colors based on a value and then starts flashing when a
threshold is exceeded.
Note: When more than one effect of the same type becomes enabled, it is the last one
in the list that is applied. You can use the Move Up and Move Down buttons on
the Animation tab of the Shape Properties dialog, to move the effects around in
the list.
OR
For more information about Visual T&D’s Standalone HMI mode, refer to the Visual T&D
Explorer User Manual.
In Visual T&D’s Standalone HMI mode, Diagram Editor is always started in the Animation mode.
You can always switch between this mode and the design mode, by following the steps described
You cannot switch to the Design mode: the diagram is always animated.
All contextual menus are disabled. However, the F1 key, which triggers the online help, is
functional.
The diagram is always displayed using the Full Screen display setting.
The Kiosk mode cannot be activated at runtime: its activation must be specified during the
Standalone HMI mode configuration process. Refer to the Visual T&D Explorer User Manual for
more details.
Overview
Visual T&D Diagram Editor provides additional features to help you create diagrams based on
standard shapes.
Shape libraries provide you with a means to define a set of standard shapes that you will use for all
your diagrams. In fact, Cooper Power Systems provides a library known as the Basic Shapes
Library, which contains frequently used shapes, buttons and displays. These shapes are animated,
so that you can use them to monitor the value or quality of a data point, or to see if any alarms
have occurred and to acknowledge and clear the alarms, or to operate data points in your diagram.
For example, the library contains one button that opens (sets to off) a binary output point and
another that closes (sets to on) a binary output point. You could retrieve these two shapes from the
library and add them to your diagram. You would then specify which data point you want to
operate. Thereafter, you would just need to click the buttons directly in your diagram in order to
operate the binary output point. The Basic Shapes library is discussed in detailed under “The Basic
Shapes Library”, page 61.
You will undoubtedly use the Basic Shapes library extensively. However, you may also want to
create your own libraries containing shapes and animations that are specific to your diagrams and
are not in the Basic Shapes Library. Once you have added a shape to a library, you can manage the
versions of that shape. Whenever you modify a shape in a library, you can easily update all the
diagrams that use the shape.
Current libraries – The left side of the dialog box displays a hierarchical view of the currently
available libraries.
Shapes – The right side of the dialog box displays a list of the shapes available in the selected
library or folder.
The File menu – The File menu provides commands to help you manage the libraries and
their contents.
The Shape menu – The Shape menu provides commands to help you manage the shapes in
the libraries.
Note: By default, all libraries are created in the Libraries folder, within the Client folder.
Click Manager in the Library menu, to display the Library Manager dialog.
Use the Pointer or Selection tool to select the shape in the diagram.
The program now displays a Save As dialog, which is actually the Library Manager dialog box
with two additional boxes at the bottom, in which you can enter a name and version for the shape.
The dialog also allows you to select the library in which you want the shape to be stored.
Click Save.
In the Library Manager dialog box, select the library or an existing folder in the left pane of
the dialog box.
Select the New Folder command from the File menu of the Library Manager dialog box.
In the Library Manager dialog box, select the shape you want to move.
Either:
OR
Click Move in the Shape menu of the Library Manager dialog box.
The dialog title is replaced with Move To, and a Move button appears at the bottom of
the dialog box.
In the Library Manager dialog box, select the library or folder you want to rename.
Click Rename in the File menu of the Library Manager dialog box.
Renaming Shapes
You can rename the shapes in your libraries.
In the Library Manager dialog box, select the shape you want to rename.
Click Rename in the Shape menu of the Library Manager dialog box.
In the Library Manager dialog box, select the library or folder you want to delete.
Click Delete in the File menu of the Library Manager dialog box.
In the Library Manager dialog box, select the shape you want to delete.
Click Delete in the Shape menu of the Library Manager dialog box.
If you choose to add the shape to the drawing without a link, you will be unable to update the
shape from the library. Adding an unlinked shape is similar to using the Copy and Paste
commands.
In the Library Manager dialog box, select the shape you want to add to your drawing.
Either:
Drag and drop the selected shape onto the drawing, at the desired position.
OR
In the Shape menu of the Library Manager dialog, click Add Linked Shape to Drawing.
In the Library Manager dialog box, select the shape you want to add to your drawing.
Click Add Shape to Drawing in the Shape menu of the Library Manager dialog.
When you add a shape to the library, the program performs the following validations:
If there is no shape with same name, the new shape is added to the library.
If there already is a shape with the same name, but with a higher version number, the
operation is refused.
If there already is a shape with the same name and version number, you will be prompted to
overwrite the library shape. Since both shapes have the same version number, the Update All
Linked Shapes command in the Library menu will not update any other occurrences of the
shape in the diagram.
If there already is a shape with the same name, but with a lower version number, you will be
prompted to overwrite the library shape.
To do this:
If some Visual Basic modules or pages previously associated with the shape are missing, the
application will display them and will prompt you to provide the new associations.
If your diagram contains a grouped shape that you have stored in a library, and you now
change the structure of the grouped shape by adding a new shape to the group, for example,
the Update Library command will no longer be available for the modified shape. To update
the shape in the library, proceed as follows:
Leave the same name in the Name box, enter a new version number in the Version box,
and click Save.
On your drawing, use the Pointer or Selection tool to select the shape to be updated.
The Export command of the File menu saves complete diagram pages will all their shapes and
Visual Basic modules, in a special type of data file. You can then use the Import command of the
File menu to merge these pages and modules into any other diagram.
The program displays a dialog box, showing you the pages that are currently in the Visual
Basic project for the selected shape. Note that the main page does not appear in the list.
Click Next.
The program displays a second dialog box, listing all the Visual Basic project items in the
diagram pages you have selected.
Click Finish.
Enter a name for the file and if need be, select a destination folder other than the suggested
folder (Diagrams).
Note: You cannot export the main page of your diagram. Therefore, the page does not
appear in the list of pages that can be exported.
Since this approach is not really convenient, Diagram Editor provides a simple method by which
you can create generic shapes that you can then easily associate with any data point. Instead of
directly naming points in the expressions, you will design your animation effects by using
symbolic values that we will call aliases. Before running the animation, you will simply associate
the aliases used in each shape with the real data points that are used to control and monitor your
process.
If your data points are named according to some systematic naming convention, Diagram Editor
can also provide you with a method for automatically associating aliases with data points.
The Variables and Aliases button in the Expression Editor displays the list of all the variables
(data points) known to the server, as well as all the aliases you have defined for a shape. The
aliases are added to the end of the list, and their names are surrounded with square brackets so that
you can easily identify them.
To manually assign the aliases for all the shapes in your diagram:
The program displays the Assign Aliases dialog box. If you selected a particular shape, you will
see the aliases used in that shape; otherwise, you will see a list of all the shapes in your diagram,
with all the aliases used in all the shapes.
In the screenshot below, we selected a particular shape in the diagram, called L3_ION. The shape
animation contains 3 aliases: current, polarity and voltage. We have already mapped current to a
data point called L3_ION_IA, and polarity to a data point called L3_ION_V1_Polarity. We are in
the process of using the drop-down list to choose a data point for voltage. The Resolution column
displays "Automatic" by default, but once you have chosen a data point in the drop-down list, it
displays "Manual" to indicate that you have manually assigned the alias to a data point.
Object Description
Shapes If you selected a shape before displaying the dialog, the Shapes section will
display the group hierarchy of the selected shape; otherwise, it will display all the
shapes in the diagram and their individual group hierarchies.
The Variables and aliases grid displays the list of variables and aliases used in
the selected shapes.
Variable Use the drop-down list to choose a data point for the alias shown in the same row.
An empty cell indicates that no data point has been assigned yet to the alias.
Note that if you change the name in the Alias column, the name of the alias will
also be changed in the animation expressions that use the alias.
Resolution This column indicates whether the alias will be resolved automatically or
manually. To automatically assign aliases, you will use a Visual Basic procedure
in the Basic Shapes library. See "Automatically Assigning Aliases to Variables",
below.
Context This column indicates the name of the shape and the animation effect in which
the alias (or data point, if you did not use an alias in the animation expression) is
used.
Find Displays a dialog box, in which you can enter a name that you want to locate in
one of the columns of the grid.
Replace Displays a dialog box, in which you can enter a name that you want to locate in
one of the columns of the grid, as well as a replacement string.
You can invoke the automatic alias assignment procedure while you are designing your diagram.
You will do this by using a Visual Basic object in the Basic Shapes library, called the
ResolveAlias object. This object contains a VBA module with 2 scripts that you can use to
automatically map aliases to data points in your diagrams:
ResolveByName.
This procedure determines the data point name by appending the name of the alias to the
name of the shape. For example, if the shape were called F1_BRK_ and included an
animation expression that used an alias called [CONTROL], the procedure would map the
alias to the data point called F1_BRK_CONTROL.
ResolveFromFile.
This procedure uses the name of the shape to look up the alias in an external CSV file. You
can use this procedure either when your data point naming convention is too complex for you
to use the ResolveByName procedure, or when the names of the data points are readily
available in an external file.
Assign the ResolveByName procedure to the selected shape's Resolve Alias event.
In the Library Manager dialog, select the Resolve Alias folder in the Basic Shapes
library.
In the right pane, select the ResolveAlias shape, and drag and drop it onto your diagram.
Note: When you save your diagram, the newly inserted ResolveAlias object becomes
part of the diagram. Thus, you will not have to retrieve the object from the library
the next time you open the diagram.
Assign the ResolveByName procedure to the selected shape's Resolve Alias event:
Select the shape for which you want to resolve the aliases.
In our example, we have selected an object called SimSS_025_F1_.
This grouped shape contains 3 aliases: [IA], [IB] and [IC], representing the phase A,
phase B and phase C current, respectively.
In the wizard dialog, click Add or modify diagram event handlers, then click Next.
In the Select event handler section, choose the Resolve Aliases event, the
ResolveAlias module, and the ResolveByName procedure using the drop-down lists.
The Resolve Aliases event handler gets added to the shape's event handlers, as
shown in the Event handlers box at the bottom of the dialog.
Click Resolve Aliases in the Animation menu, to have Diagram Editor automatically assign
the aliases for the SimSS_025_F1_ shape.
This will display the Assign Aliases dialog. In our example, we can see that Diagram Editor
has mapped each alias to a data point name consisting of the shape name plus the alias name.
Set up a comma-separated file (CSV) that shows the relationship between the aliases and the
data points.
Click Resolve Aliases in the Animation menu, to have Diagram Editor automatically assign
the aliases for the selected shape.
The first step is described below. The remaining steps are identical to those described for the
ResolveByName procedure, with the exception that you will assign the ResolveFromFile rather
than the ResolveByName procedure to the shape's Resolve Alias event. See "Using the
ResolveByName Procedure", above.
A header line with the words: shape, alias and point, separated by commas.
the name of the corresponding data point, each enclosed in quotes and separated by
commas.
For example:
shape,alias,point
"F1","IA","SimSS_025_F1_IA"
"F1","IB","SimSS_025_F1_IB"
"F1","IC","SimSS_025_F1_IC"
"F2","IA","SimSS_025_F2_IA"
"F2","IB","SimSS_025_F2_IB"
"F2","IC","SimSS_025_F2_IC"
Note that the ResolveFromFile procedure expects the CSV file to be called Aliases.csv. It also
expects the CSV file to be located in the Temp folder of your hard disk. If you use another name,
such as Maple Grove Aliases.csv, or store the file in some other folder, you must modify the
procedure accordingly. To do this:
Select the shape to which you have assigned the ResolveFromFile procedure.
In the left pane of the Visual Basic Editor window, double-click ResolveAlias in the Modules
folder.
If you have an error when resolving aliases, add a schema information file to the data source. To
do this:
[NameOfAliasesFile.csv]
ColNameHeader=True
Format=CSVDelimited
DecimalSymbol=.
Modify the first line of the file to replace “NameOfAliasesFile.csv” by your csv filename.
For example, the first line of the file will look like this: [Maple Grove Aliases.csv]
In the Notepad File menu, choose Save As…. The Save dialog will appear.
Press Save.
To help familiarize you with using the Basic Shapes library, we will go through an example. Our
example uses a simulation database and data points that we have in our diagram, but you can go
through the example using data points that exist in your own diagram.
Our diagram contains a binary input point called SimSS_220_L1_ALM1. This is a binary input
point representing an alarm on line 1. We would like to know at a glance, whether the alarm is on
or off. We would also like to know if the quality of the data point is good or bad.
Proceed as follows:
If you look at the shape properties, you will see that the shape contains 3 "Change color"
animation effects. If you then look at the animation expressions, you will see that the first one
changes the color of the shape to green if a binary input point with an alias called
[BINARY_INPUT] is on, the second one changes the color to red if the data point is off, and the
third one changes the color to grey if the data point quality is bad.
With the shape still selected, click the Shape menu, then Grouping, then Show.
In the Shape Properties dialog, click the Text tab, enter "L1 ALM" in the Text box, and
click OK.
Click Assign Aliases in the Animation menu, and assign the data point called
SimSS_220_L1_ALM1 to the [BINARY_INPUT] alias (for this procedure, see “Manually
Assigning Aliases to Variables”, page 55).
The L1 ALM shape will turn green, red or grey each time there is a change in the state of the
data point.
On the real device, generate a real alarm, then clear the alarm, and then provoke a
communications failure or some other incident that will affect the quality of the data point,
and watch the L1 ALM square change colors.
OR
Get into simulation mode via the Visual T&D Explorer Tools menu.
In the View menu, click Data Point Properties, and directly manipulate the state and
quality of the data point, in order to see the L1ALM shape change colors on your
diagram.
OR
If you can operate a binary output point that affects the state of the binary input point:
Drag and drop the Click Open and Click Close shapes from the Buttons folder of the
Basic Shapes library onto your diagram.
Each of these buttons operates a binary output point, and contains an animation that uses
an alias called [BINARY OUTPUT].
For each button, click Assign Aliases in the Animation menu, and assign the alias to the
binary output point you are going to operate. In our simulation database, the binary
output point is called SimSS_220_L1_ALM1_CONTROL. For the alias assignment
procedure, see “Manually Assigning Aliases to Variables”, page 55.
Click the Click Open and Click Close buttons, and watch the L1 ALM shape change
colors.
With the display page management features, you will be able to create sophisticated diagrams that
provide increasing levels of detail. The background diagram page can represent the general status
of each device and by clicking on a device, you can display a detailed representation of all
If you decide to create individual diagrams for each device on the site, you will soon realize that
these diagrams are quite similar and that the only differences are the names of the devices and
their data points. We have already seen that with Diagram Editor, you can create generic shapes
that contain aliases that are automatically or manually assigned to data points. In the same manner,
you can create diagram pages that contain generic shapes that will be dynamically renamed so that
the program can correctly assign the data points.
Object Description
List of pages Displays the list of all the pages in your diagram. The diagram will always
contain at least one page.
Add Adds a new page to the diagram. Displays a dialog box in which you can set the
name and properties of the new page.
Show Displays the selected page and makes it available for editing.
The program displays a dialog in which you can specify the name and properties of the page:
The Display tab is the same than for the Page Properties dialog box (see “Setting up the Current
Page’s Properties”, page 4).
Select how much the page will be zoomed in/out when the diagram is run.
Create new window If selected, the page will be displayed in a pop-up window.
Use the following If selected, the page will be used to display several pages using shape renaming
shape renaming tables (see List of tables, below).
tables
List of tables Displays the list of shape renaming tables defined for this page. That is, you will
assign generic names to the shapes on the page, and have the shapes dynamically
renamed via the renaming tables that you define here. Thus, you create just one
page from which you will display several pages. You can, therefore, use the page
to monitor several identical devices, as discussed under “Using a Single Diagram
Page to Monitor Multiple Devices”, page 69.
The box is available only if you selected Use the following shape renaming
tables.
Add Adds the name you entered in the upper box of the Tables section, to the list of
renaming tables assigned to the page.
Delete Deletes the selected table from the list of renaming tables.
Edit Displays the Rename Shapes dialog, which you can use to rename the shapes in
the table currently selected in the list. The procedure for renaming generic shapes
is outlined under “Using a Single Diagram Page to Monitor Multiple Devices”,
page 69.
Select the Display tab and enter the page name (SEL351 or SEL387).
Click OK.
Click Close.
Add 2 buttons to your main diagram page, that you will use to open the pages you have just
added:
Drag and drop the Click Page Open shape onto your diagram.
Copy and paste the shape, so that you now have 2 page opening buttons on your main
diagram page.
In the Shape Properties dialog, enter "SEL 351" in the Name box, and click OK.
SEL 351 will become the group name of the button shape. It is important to note that the
name of the button must be the exact name that you assigned to the page via the
Pages dialog.
This text will appear on the button. We used "RELAY_F1" since we have a relay on
Feeder 1 and one on Feeder 2. We could, however, have entered any meaningful text.
Repeat the procedure for the second button, naming the button SEL 387 and labeling it
"RELAY_F2".
In the Pages dialog, select SEL 351, and then click the Show button to display the page.
Assign a group name of "SEL 351" to the button, since the name of the button shape
must match the name of the page.
Replace the button text with "EXIT" (or any other text, such as "CLOSE" or "MAIN").
On the SEL 387 page, add a button to close the page. Call the button "SEL 387", and replace
the button text with "EXIT".
Now, the SEL351 and SEL387 pages each have the following button:
The Save As dialog box appears. Select the folder where you want to save the diagram file
and type the file’s name.
Click Save.
Click the RELAY_F1 button to have the SEL351 page appear in a pop-up window.
On the SEL351 page, click the EXIT button to close the pop-up window.
Click the RELAY_F2 button to have the SEL387 page appear in a pop-up window.
On the SEL387 page, click the EXIT button to close the pop-up window.
Visual T&D Diagram Editor provides a method that greatly simplifies this process. You can create
a single page that is dynamically mapped to the devices when you run the diagram. This approach
saves time and effort not only when you first draw the diagram page, but also if you subsequently
need to make changes to the diagram. You have only one page to change.
Suppose that you have drawn your main diagram page. You would now like to monitor the data
points of 3 identical ION6200 devices located on lines 1, 2 and 3, respectively. You would like to
have the information for each device appear in a separate pop-up window that you would display
by clicking a button on the main diagram page. You can achieve this by drawing a single page to
represent the ION6200 device.
Proceed as follows:
Using the View menu’s Pages command, add a new page named ION6200. In the Action tab,
select Create new window, and then select Use the following shape renaming tables. Add 3
shape renaming tables to the page, to which you assign meaningful names, such as
ION6200_L1, ION6200_L2, and ION6200_L3, respectively.
Enter a table name in the upper box of the Tables section, and click the Add button.
The name of the new table gets added to the list shown in the lower box of the Tables section.
Display the new ION6200 page. To do this, in the Pages dialog, select the ION6200 page and
click Show.
Add the desired shapes to the page, and use aliases rather than data point names for the
animation effects.
In the example below, we created 3 animated shapes, to which we assigned the following
names:
Measures.
This shape shows currents, line-to-neutral voltages, and line-to-line voltages.
CommStatus.
This shape shows the device communication status.
ExitButton.
This shape is a Basic Shapes library Click Page Close button that we will use to close the
page.
In the Modify Page dialog, select the ION6200_L1 renaming table and click the Edit button.
When you run the animation, the aliases used on the page will be resolved using the prefix
you specified here. For example, if the Measures shape has aliases called [IA], [IB], [IC] and
[IAvg], these will be dynamically resolved to ION_L1_IA, ION_L1_IB, ION_L1_IC and
ION_L1_IAvg.
Select the ION6200_L2 renaming table and rename the same 3 shapes with ION_L2_, so the
aliases can be resolved using the ION_L2_ prefix. Repeat the process for table ION6200_L3,
renaming the 3 shapes with ION_L3_.
In the Library menu, click Manager, and then from the Basic Shapes library’s Buttons
folder, drag and drop 3 Click Page Open buttons onto your diagram.
Assign to the first button shape, the name of the first renaming table: ION6200_L1, and enter
the text to be displayed on the button.
Assign to the third button shape, the name of the third renaming table: ION6200_L3, and
enter the text to be displayed on the button.
The labels on the buttons are arbitrary. The names of the 3 button shapes, however, are not
arbitrary. They must match the names of the 3 shape renaming tables. If you need help
assigning names to the button shapes or modifying the text labels, see “Displaying the Pages
of a Multiple-Page Diagram”, page 66.
In the Library menu, click Manager, and then from the Basic Shapes library Resolve Alias
folder, drag and drop the ResolveAlias shape onto your diagram.
Add the ResolveByName event handler to each shape on the ION6200 diagram page that
requires alias resolution. For instructions, refer to “Automatically Assigning Aliases to
Variables”, page 57.
For each of the 3 pages to be displayed, create a Visual Basic procedure that calls the
Document.OpenPage method to display the diagram page. The parameters of the method
must:
specify the name of the page to be opened, namely, "ION6200" in this example;
specify the name of the button shape that will be used to open the page.
Note: You will find an in-depth discussion on how to create Visual Basic scripts under
“Working with Scripts”, page 75.
Click the ION 6200 L1 button to display the ION6200 page in a pop-up window showing the
values for the ION6200 device on line 1, and then click the EXIT button to return to the main
diagram page.
Click the ION 6200 L2 button to display the ION6200 page in a pop-up window showing the
values for the ION6200 device on line 2, and then click the EXIT button to return to the main
diagram page.
Click the ION 6200 L3 button to display the ION6200 page in a pop-up window showing the
values for the ION6200 device on line 3, and then click the EXIT button to return to the main
diagram page.
The screenshot below shows the pop-up window for the ION6200 device located on line 2.
Overview
The basic functions of Diagram Editor are all you need to create sophisticated animated diagrams
that provide you with a basic real-time representation of a monitored process. While this may be
sufficient in many cases, the real power of Diagram Editor becomes available when you use the
built-in Visual Basic language to create scripts that support operator interaction.
The Visual T&D Diagram Editor includes the Microsoft Visual Basic for ApplicationsTM
technology. Using this technology, you can create sophisticated diagrams whereby operators can
use the mouse to display detailed views of your site and control the values of the data points.
Each shape you create in a diagram can generate events that launch Visual Basic scripts when the
shapes are added to a diagram or when the operator clicks on them with the mouse. These scripts
can open new diagram pages and access the Visual T&D server to read or write data points in
order to perform sophisticated control operations.
When the operator performs such an operation, Diagram Editor generates an event that you can
process by associating it with a Visual Basic procedure in your script. To create the scripts, you
will use the Visual Basic Wizard and the Visual Basic Editor.
The Visual Basic Wizard assists you in managing your Visual Basic project. The Wizard guides
you through the steps required to create new program modules and new Visual Basic procedures.
You will also use the Wizard to associate events and shapes with specific Visual Basic procedures.
Your Visual Basic project can contain as many event handling procedures as you want. You can
create an individual event handler for each shape, or share a single handler for any number of
shapes.
Some Diagram Editor events are designed to support user interaction while in the Animation
mode; some other events are designed to support designer interaction in the Design mode.
Field Description
DiagramShape The Shape object on which the operator clicked.
VirtKeyCode The keyboard keys that were pressed when the shape was double-clicked:
VKC_NONE.
No keys were pressed.
VKC_ALT.
The ALT key was pressed.
VKC_CONTROL.
The CTRL key was pressed.
VKC_SHIFT.
The SHIFT key was pressed.
A combination of the above keys may have been pressed when the mouse was
clicked.
MOUSE_LEFT_BUTTON.
The left button was clicked.
MOUSE_MIDDLE_BUTTON.
The middle button or the wheel was clicked.
MOUSE_RIGHT_BUTTON.
The right button was clicked.
Field Description
DiagramShape The Shape object on which the operator double-clicked.
VirtKeyCode The keyboard keys that were pressed when the shape was double-clicked:
VKC_NONE.
No keys were pressed.
VKC_ALT.
The ALT key was pressed.
VKC_CONTROL.
The CTRL key was pressed.
VKC_SHIFT.
The SHIFT key was pressed.
A combination of the above keys may have been pressed when the mouse was
clicked.
MOUSE_LEFT_BUTTON.
The left button was clicked.
MOUSE_MIDDLE_BUTTON.
The middle button or the wheel was clicked.
MOUSE_RIGHT_BUTTON.
The right button was clicked.
Note: You can process both the Click and Double-Click events for a particular shape.
Both events are supported for the same shape and are distinct.
Field Description
DiagramShape The Shape object that the mouse entered.
Field Description
DiagramShape The Shape object that the mouse left.
The Add Shape to Diagram event handler has the following parameters:
Field Description
DiagramShape The Shape object added to the page.
Page The name of the diagram page to which the shape is added.
Field Description
DiagramShape The Shape object for which you want to resolve the aliases.
The document entitled Visual T&D Developer Reference explains the Visual T&D Diagram object
model, in detail.
Note: You do not need to use the Wizard to create modules and procedures. You can
perform these operations with the Visual Basic Editor. However, you must use
the Wizard to assign procedures to shapes and events.
Select the Visual Basic Wizard command from the Animation menu.
Note: You can also create a new module with the Module command in the Insert menu
of the Visual Basic Editor.
Select the Visual Basic Wizard command from the Animation menu.
Select the type of event to be processed. The Wizard will provide the correct parameters
according to the type of event.
Enter the name of the procedure. Your scripts will be easier to read if you select a name that
corresponds to the type of event to be processed, such as: OnClick or MyShape_Click.
Select the type of procedure. Use Function to create a Visual Basic procedure that can return
a result and that you can use in an expression. Use Subroutine to create a procedure that does
not return a result.
Select the scope of the procedure. Use Public to indicate a procedure that is accessible to all
other procedures in all modules. Use Private to indicate a procedure that is accessible only to
the procedures in the module in which it is declared.
Enter the parameters and return type for the procedure. The contents of this field are
automatically set when you select an event type to be processed.
The Event Handlers dialog box will open at the end of this procedure’s creation (see
“Assigning Procedures to Events and Shapes”, below).
Note: You can also create a new procedure with the Procedure command in the Insert
menu of the Visual Basic Editor.
Select the Visual Basic Wizard command from the Animation menu.
Object Description
Select shape Displays the hierarchy of the shape selected in the diagram, or of all available
shapes if none was selected.
Click
Double-click
Mouse Enter
Mouse Leave
Add shape to diagram
Resolve alias
Propagate to parents Indicates whether the event will be propagated upwards in the hierarchy to the
enclosing groups.
Propagate to Indicates whether the event will be propagated downwards in the hierarchy to the
children enclosed groups and shapes.
Visual T&D Diagram Editor provides a standard integrated development environment (IDE) for
convenient development of the Microsoft ® Visual Basic ® for Applications (VBA) procedures
that you will require to automate your diagrams.
The development environment is consistent with those found across all VBA-enabled applications
such as Microsoft ® Office. If you have used VBA in any of these applications, Diagram Editor’s
environment will be familiar to you.
For complete details on using the development environment and writing procedures, see the VBA
online help.
Select the Visual Basic Editor command from the Animation menu.
To program the various functions required for your application, refer to the Visual T&D Developer
Reference.