Beruflich Dokumente
Kultur Dokumente
Process Analyst
September 2007
DISCLAIMER
Schneider Electric SA makes no representations or warranties with respect to this manual and, to the maximum extent permitted by law, expressly
limits its liability for breach of any warranty that may be implied to the replacement of this manual with another. Further, Schneider Electric SA reserves
the right to revise this publication at any time without incurring an obligation to notify any person of the revision.
COPYRIGHT
© Copyright 2007 Schneider Electric SA. All rights reserved.
TRADEMARKS
Schneider Electric SA has made every effort to supply trademark information about company names, products and services mentioned in this manual.
Citect, CitectHMI, and CitectSCADA are registered trademarks of Citect Pty. Ltd.
IBM, IBM PC and IBM PC AT are registered trademarks of International Business Machines Corporation.
MS-DOS, Windows, Windows NT, Microsoft, and Excel are either registered trademarks or trademarks of Microsoft Corporation in the United States
and/or other countries.
Novell, Netware and Netware Lite are are either registered trademarks or trademarks of Novell, Inc. in the United States and other countries..
All other brands and products referenced in this document are acknowledged to be the trademarks or registered trademarks of their respective holders.
GENERAL NOTICE
Some product names used in this manual are used for identification purposes only and may be trademarks of their respective companies.
Configuring Cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Configuring Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Configuring Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Adding or removing toolbar commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Changing the order of toolbar commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Configuring the Object View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Object View properties page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Working with Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Saving a view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Loading a view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Index 265
About this Documentation
The information presented here is intended for two types of user, Operators and
Users:
Operator - a person who uses the Process Analyst in a runtime environment
to monitor plant operations. An Operator might configure the properties of
various Process Analyst components during runtime to facilitate their work.
An Operator is not expected to possess in-depth technical knowledge about
the Process Analyst components. For details about using the Process Analyst
as an Operator, see “Process Analyst for Operators”.
User - a person who uses the Process Analyst during design time to engineer
a view for an Operator. A User possesses in-depth technical knowledge
about Vijeo Citect and Cicode, and understands how these components
interact. For details about using the Process Analyst as a User, see “Process
Analyst for Users”.
2
Part 1
Process Analyst for Operators
The Process Analyst control allows Operators to view trend and/or alarm tag
data (both real-time and historical) for comparison and analysis during run time
through their existing Vijeo Citect server architecture. Users can configure
certain properties of the Process Analyst control during design time.
A typical Process Analyst view might look like the one shown here. Your
Process Analyst views will probably look different to this example.
5 7 8
10
5 Date/time axis: Located at the top of a pane, the date/time (horizontal) axis
displays the date or time (or both) of the data for the primary selected pen
within a pane. You can configure the axis.
6 Vertical axis: Analog pens have a vertical axis on the left-hand side of the
pane to indicate data values. You can configure this axis.
7 Cursor: A cursor allows an Operator to determine value at a given point in
time by dragging the cursor line to the point required. You can configure the
cursor.
8 Cursor labels: Display the value where the cursor intersects the trend value
line.
9 Navigation toolbar: Contains commands to allow an Operator to travel
forward or backward through trends, as well as other navigation-related
tasks. You can configure this toolbar to contain different items.
10 Object View: When displayed, the Object View appears under the
navigation toolbar and displays information about your Process Analyst
pens, such as name, color, scale, and so on. You can configure the Object
View.
Chapter 2: Using the Main Toolbar
The Process Analyst main toolbar is located above the top pane. The main
toolbar contains commands that allow you to perform general operations, such
as save and load Process Analyst views, print trend reports, add or remove pens,
display or hide cursors and labels, and so on.
Toolbar commands can be customized; for details, see “Configuring Toolbars”.
The table below describes the items that are included on the main toolbar by
default.
Item Description
Load View. Loads a saved view from file. For details, see “Loading a view”.
Save View. Saves a view to file. For details, see “Saving a view”.
Print. Displays the standard Windows Print dialog box for printing trend reports. For
details, see “Printing and Exporting”.
Copy to Clipboard. Copies visible pens to the Windows Clipboard. For details, see
“Copying data to the Clipboard”.
Export to File. Exports visible pens to an Excel-compatible file. For details, see “Copying
data to file”.
Add Pen. Displays the Add New Pen(s) dialog box for adding a pen. For details, see
“Adding Pens”.
Remove Pen. Deletes the currently selected pen from the trend display. For details, see
“Deleting Pens”.
Lock/Unlock Pens. Toggles the locking of pens. For details, see “Locking/Unlocking
Pens”.
Show/Hide Points. Toggles the display of points representing where sample data was
recorded in the archive. For details, see “Pens: An Overview”.
Show/Hide Cursors. Toggles the display of cursors. For details, see “Using Cursors”.
Show/Hide Cursor Labels. Toggles the display of cursor labels. For details, see “Using
Cursor Labels”.
Toggle Object View. Toggles the display of the Object View. For details, see “Using the
Object View”.
Properties. Displays the Properties dialog box for configuring the Process Analyst control.
For details, see “Configuring the Process Analyst”.
Help. Displays the Process Analyst online Help.
The Process Analyst pens allow you to analyze and compare both real-time and
historical data from trend and alarm servers.
See Also “Pens: An Overview” | “Pen Types”
Pens: An Overview
Process Analyst pens are drawn against time. Each pen has its own colored line
(and can contain other graphical elements). Sample markers (or points) are
drawn on the line to indicate where data was recorded in the archive. The style
of the line indicates the quality of the data; the style of the sample marker
indicates the compaction of the sample.
Data Compaction Data compaction is the visual grouping of multiple data points into a single data
point when the data in the archive is too dense to be displayed as individual
data points for the selected time span.
Data is compacted by grouping raw samples together to form a multiple sample.
Sample compaction is indicated on the graph by using different sample markers.
For example, in the illustration below, the two sample markers that appear as
squares actually represent multiple raw samples. However, because the data
points in this view are too dense to display as individual points, the multiple
samples appear as one data point.
The following illustration zooms in on the second multiple sample, and shows
that what appeared to be a single raw sample actually consists of several raw
samples:
The Process Analyst uses the following default point styles for single and
multiple samples:
Sample compaction Point type
Single Ellipse
Multiple Rectangle
Interpolated Triangle (see “Interpolated samples”).
6
Interpolated samples
Normally samples are only single or multiple. But there is a specific situation in
which an interpolated sample is used to correct a graph that only occurs with
event trends.
The frequency of the data stored in an event trend can vary dramatically; for
example, where several samples are within one display period, followed by no
samples for a long time. A multiple sample will be drawn with a value
calculated from the samples within the period. But the value after that period
will be whatever the last sample in the period was. So an interpolated sample is
added at the start of the next display period to correct the graph.
See Also “Interpolation”
Request modes
Because the Process Analyst Control makes requests for a range of data using a
display period, Vijeo Citect needs to perform calculations on data if it becomes
too dense in order to calculate the value of a multiple sample. The Process
Analyst provides the following options for this calculation:
Average - The value will be an average of all the individual samples within
the multiple sample, as will the timestamp. This is the default calculation
method.
Maximum: The value will be the maximum value out of all the individual
samples within the multiple sample. The timestamp will be that of the
individual sample that was the maximum. The timestamp will be the
average of all the individual samples within the multiple sample.
Minimum: The value will be the minimum value out of all the individual
samples within the multiple sample. The timestamp will be that of the
individual sample that was the minimum. The timestamp will be the
average of all the individual samples within the multiple sample.
Newest: The value will the latest arrived value out of all the individual
samples within the multiple sample. The timestamp will be that of the
individual sample that was the newest. The timestamp will be the average of
all the individual samples within the multiple sample.
Data Quality Process Analyst pens use the same quality system as Vijeo Citect trend and
alarm data. There are four data quality states:
Good - Samples were recorded in the trend archive as good.
NA - When Vijeo Citect is unable to obtain a sample or the data retrieved
was invalid, an N/A sample will be recorded in the trend archive.
Gated/Disabled - For trends, when the trigger of a trend is off, a value of
"Gated" is recorded in the trend archive. For alarms, this data quality state
indicates that the alarm has been disabled.
The Process Analyst uses the following default line styles to indicate data
quality:
Quality Line style
Good Solid
7
Here the quality of the third sample is gated, indicated by the broken line connecting these
samples.
With multiple samples, the quality of the last sample in the group determines how the line is drawn. Consider
the following examples:
This example shows that the third sample is actually a multiple sample. The quality of the
third (multiple) sample and the next sample is N/A, again indicated by the break in the
trend line.
Here the quality of the third multiple sample is gated, again indicated by the broken line
connecting the samples.
The line style indicating the data quality is configurable during run time and
design time; for details, see “Configuring pen quality”.
Date/Time (Horizontal) All Process Analyst pens have a date/time axis, located at the top of the pane.
Axis
The date/time axis displays time using the current locale format specified in
your computer date/time settings. If the millisecond component is required, it is
appended to the end in the format “<xxx>ms.” Since the local time zone is
determined from the current computer settings, these settings must be
configured accurately.
The date/time axis can also display data using the universal time coordinate
(UTC) format. You can switch between local or UTC time as you like (see
“Configuring pen axes”). If the current time is 10.00p.m. UTC, in the Sydney
(GMT+10) time-zone, local time will be 8.00p.m.
The date/time axis is divided into major and minor time intervals, which change
dynamically depending upon the time span. In the illustration above, the major
intervals are 1 minute apart, and the minor are 5 seconds apart.
Note the following:
When the axis time span is 1 minute or less, the format of the axis labels
includes milliseconds and the date is removed.
When the axis time span is 1 week or above, the time is removed and only
the date is displayed.
8
By default, the date/time axis displays a time span of 10 minutes; the major
intervals represent 5 minutes, and the minor intervals 30 seconds.
Now indicator
The Now indicator is a small white circle on the date/time axis that indicates the
current computer time based on the computer’s time settings.
The position of the Now indicator is refreshed according to the value specified
in the Display Refresh Date text box in the Process Analyst Control Properties
dialog box.
Note: If you have used the Vijeo Citect trend page feature, note the following: In
Vijeo Citect the right-hand side of the screen always represents Now (when
looking at real-time data). In the Process Analyst control, “Now” is represented
only by the Now indicator, which may be located anywhere on the trend
display, even off screen, since it is possible to scroll into the future, or back into
the past.
You can scroll and scale the date/time time axis to interact with your Process
Analyst pens; for details, see “Interacting with the Process Analyst”. You can
also configure the date/time axis to suit your preferences; for details, see
“Configuring pen axes”.
Vertical (Value) Axis The vertical (value) axis is located at the left-hand edge of the pane.
Like the date/time axis, the value axis consists of major and minor intervals, but
they represent value intervals rather than date and time. The intervals are
calculated automatically by the Process Analyst.
The value axis is shown only for analog pens; the axis displayed reflects the
values for the primary selected pen.
By default the vertical axis will use the engineering scale from the tag of the
selected pen. The vertical axis also supports autoscaling. When autoscaling is
enabled, the vertical axis automatically adjusts its limits to accommodate new
samples as they are added to each individual pen.
9
In this example, there are two panes, each of which has a differently scaled
vertical axis.
You can scroll and scale the vertical axis; for details, see “Scrolling the Chart”
and “Scaling the Chart”. You can also configure the appearance of the vertical
axis; for details, see “Configuring pen axes”.
Gridlines The Process Analyst pens use gridlines as a visual guide to help an Operator
determine the value of trends. Major gridlines are solid lines; minor gridlines are
broken lines. Analog pens have vertical and horizontal gridlines; alarm and
digital pens only have vertical gridlines. The display of gridlines changes
dynamically according to the selected time span.
You can configure vertical gridlines at run time for all pen types; you can
configure horizontal gridlines for analog pens. For details, see “Configuring pen
gridlines”.
Pen Layout You can are display pens in the Process Analyst by stacking or overlaying.
In stacked mode, a user-specified amount of vertical real-estate is allocated
to the pen, and with this, stacked pens are laid out under each other on the
pane, starting from the top of the pane under the date/time axis, like this:
Here, three pens (one analog and two digital) are stacked under each other.
Stacking applies to all types of pens.
In unstacked mode, pens are drawn on top of each other. The order in
which the pens were added to the pane governs the drawing order: the last
10
pen added is the topmost pen drawn. When a pen is selected, it is brought to
the front of any other pens displayed
Here, two analog pens are overlaid. You can also overlay digital and alarm
pens.
You can have any mix of stacked and unstacked pens on a pane.
Pen Types
The Process Analyst control supports three types of pen: analog pens, digital
pens, and alarm pens. Analog and digital pens are associated with trend tags;
alarm pens are associated with alarm tags.
Analog pens The Process Analyst control typically uses analog pens to represent nonbinary
data. Only analog pens have a value (vertical) axis, which the data is plotted
against, as shown here:
Interpolation
Analog pens have two types of interpolation that allow you to specify how to
connect data samples on a trend line: straight and stepped:
Straight - a line is drawn directly between the points like this:
Stepped - the lines drawn always maintain the value of the previous sample
until a sample with a different value arrives, in which case a vertical line is
drawn:
11
The Process Analyst allows analog pens to be configured at run time and design
time. For details, see “Configuring Pens”.
See Also “Interpolated samples”
Digital pens The Process Analyst control typically uses digital pens to represent binary data.
Values on the pen are clamped to a range of 0 to 1. Any value equal to or greater
than 0.5 is clamped to 1; all other values are clamped to 0. A fill color is used to
indicate where the data is 1, as shown here:
By default, the layout of digital pens is stacked. For details, see “Pen Layout”.
The Process Analyst allows the appearance of digital pens to be configured
during run time and design time. You can configure the trend line color, width,
and fill color. For details, see “Configuring pen appearance”.
Alarm pens The Process Analyst uses alarm pens to graphically display the history of a Vijeo
Citect alarm over time. The Process Analyst supports seven different types of
alarm pens.
The alarm’s on/off transition state changes and acknowledgements are all
represented graphically in the alarm pen display. To achieve this, the alarm pen
consists of three elements: the alarm state, on/off, and acknowledgement.
The diagram below illustrates how an alarm pen displays the information of an
alarm tag:
1
3
on/off
2 4
Like other types of pen, alarm pens can represent variations in data quality and
data compaction.
The Process Analyst allows alarm pens to be configured at run time and design
time. For details, see “Configuring alarm pens”.
On/off
When an alarm is off, the alarm pen will draw the line low. When the alarm
transitions to on, the line is drawn high.
Alarm states
When an alarm transitions to on, it enters a particular state. The states of an
alarm are dictated by the type of Vijeo Citect alarm tag. The Process Analyst
supports all Vijeo Citect standard alarm types.
Note: For multi-digital alarms, the state descriptions are retrieved from the Vijeo
Citect alarm record.
The Process Analyst uses a different color, shading style, and description to
represent each alarm state; these properties are configurable. For details, see
“Configuring alarm pens”.
Alarm acknowledgment
Process Analyst alarm pens can represent when alarms are acknowledged.
The Process Analyst indicates the period for which the alarm has been left
unacknowledged by drawing a line above the trend line. A new
unacknowledged period begins whenever the alarm transitions to an on
state.
unacknowledged periods
acknowledgements
acknowledgement
marker
13
Alarm types
The Process Analyst uses the following types of alarm pen:
Alarm type Alarm pen representation
Digital
Analog
Advanced
Argyle Analog
Multi-digital
Timestamped
Timestamped analog
Timestamped digital
For multiple samples in an alarm, the alarm state value is the last recorded value
in the group.
14
Chapter 4: Interacting with the Process
Analyst
Pen Selection
Each pane on the Process Analyst can have one selected pen. The axes that are
displayed on a pane are that of the selected pen. The last pen selected across all
panes is referred to as the primary selected pen.
You can select a Process Analyst pen in several ways:
By clicking on the pen’s graphical elements (i.e., the pen line).
If the pens are stacked, by clicking the background under the pen line.
By selecting the pen in the Object View.
The selection of a pen is indicated by a subtle halo effect surrounding the pen
line. In the example shown here, the top (green) pen is selected, indicated by the
halo surrounding the pen:
16
Note that the halo does not appear if there is only one pen on the pane. Selecting
a pen on a pane also causes the same pen to be highlighted in the Object View.
Selecting a pen causes that pen to be drawn in front of other pens on the pane.
Locking/Unlocking Pens
By default, the Process Analyst locks together the time span and position in time
(horizontal axis) of all pens. However, you can unlock the pens, allowing the
pens to be displayed across different positions in time and/or time spans.
For example, you could unlock pens to compare a previous month’s data for a
tag with the data for this month. You would do this by adding two pens to a
pane that represent the same tag, then unlocking the pens, and adjusting the
time positions for each pen as required.
To control pen locking and unlocking, you use the Lock/Unlock Pens button on
the main toolbar.
Specifying a start time You can specify a start time and an end time for the trend display by using the
and end time date/time pickers. The start time picker is located on the left-hand side of the
navigation toolbar, the end time picker on the right.
The date/time picker formats the date and time using the settings obtained from
your computer for the currently logged in user. The date/time picker displays
time in 24-hour format (dd/mm/yyyy hh mm:ss nnn) where:
dd represents days
mm represents months
yyyy represents years
hh represents hours
mm represents minutes
ss represents seconds
nnn represents milliseconds (added automatically to the time)
To change the date or time in the date/time picker:
1 Click the element of the date or time you want to change in the start time
picker or the end time picker.
2 Do either of the following:
Type in a time explicitly.
Press the Up arrow key or Down arrow key to increment or decrement
the value respectively.
Note: You can use the Left arrow and Right arrow keys to move between
time elements.
This icon appears when the time picker’s value is within the local Standard time
period:
If the Daylight Savings transition involves duplicate hours, you can use the spin
controls (or Up and Down arrow keys) to select the hour you want.
Note: In order for the Process Analyst to be able to indicate that Daylight
Savings is in effect, the Automatically adjust clock for daylight saving changes
option on the Date and Time Properties dialog box must be enabled, as indicated
below:
2 Click a date or time element in the date/time picker. The opposite time
picker changes by the base time amount of the selected time element.
Fit to unit Fitting date or time to unit allows you to synchronize the selected time
element to the zero position of that time element in the start time and end time.
For example, an Operator clicks on the hh time element of the Start picker, which
shows 19:30:05.123. After Ctrl + click, the Start hour time element shows
19:00:00.000, and the End time element shows 20:00:00.000. Now the time span
represents exactly one hour, synchronized on the hour.
To fit to unit:
1 Press and hold the Ctrl key.
2 Click a date or time element in the date/time picker. Both the start time and
end time element are synchronized to zero based on the date/time element
selected.
About time spans The time span of the trend display is the difference between the start time and the
end time. The start time appears on the left-hand side of the trend display, the
end time on the right. The Span Picker (shown below) indicates the current span
being used; it also contains commonly used predefined time spans. Selecting a
time span adjusts the start time, leaving the end time as-is.
Span Lock When the time span is locked and the start time and/or end time picker changed,
the current time span is maintained. If the time span is unlocked, the time span
is not maintained when any of the time pickers are changed.
By default, the span is locked. You can toggle span locking on or off by using the
Span Lock button.
See Also “About time spans”
Navigating time The navigation controls allow an Operator to navigate backwards or forwards
through time. The amount of time moved depends upon the time currently
selected in the Span Picker. For example, if 10 minutes is selected in the Span
Picker and Back One Span is clicked, the display moves back 10 minutes into
the pen’s history.
The following navigation controls are available:
Navigation control Description
Back One Span - moves back one time span.
Synchronize to Now The Synchronize to Now command synchronizes all pens such that the date/
time reflects “Now,” which is positioned on the right-hand edge of the screen.
“Now” is calculated using the current system time.
Toggle Autoscrolling When Autoscroll is turned on, as time passes the position in time of all pens
moves by the same amount to keep pace; by default, the display is updated
every second. The refresh rate of the display can be controlled by using the
Display Refresh Rate property.
When Autoscroll is turned off, as time passes the position in time of all pens
remain fixed.
By default, Autoscroll is on. You can toggle Autoscrolling on or off by using the
Toggle Autoscrolling button.
Using the navigation controls, including the Time Span picker, causes
Autoscrolling to be turned off
The Autoscroll command is also available from the right-click (context) menu.
Zoom In/Zoom Out Use the Zoom In 50% and Zoom Out 50% commands like this:
Command Icon Description
Zoom In 50% Zooms in on the displayed data, halving the span of both axes.
Zoom Out 50% Zooms out of the displayed data, doubling the span of both axes.
Note: The midpoint of each axis is maintained during these zoom operations.
Undo Last Zoom Undo Last Zoom allows you to undo the last zoom operation, returning the
display to the previous state.
Toggle Box Zoom The Toggle Box Zoom button switches between Box Zoom mode and normal
interaction mode. In Box Zoom mode, you can define an area of the chart to
zoom in on for more detail.
To use Box Zoom:
1 Select the pen to zoom in on.
22
4 Release the mouse button. The display changes to a close-up of the selected
data.
Edit Span Click the Edit Span button to display the Edit Span dialog box, which allows
you to set non-standard time spans.
The fields provided are: w = weeks, d = days, hr = hours, min = minutes, sec
= seconds, and ms = milliseconds.
2 Enter a New span. Click the element of the time span that you want to
change, then either type in a new value, or use the Up arrow or Down arrow
to specify a new value. You can use the Right arrow and the Left arrow key
to move between the time elements.
3 Click OK. The new time span is applied.
Edit Vertical Scale The Process Analyst allows Operators to edit the vertical scale of a selected
analog pen to display more appropriate values, if required. The vertical scale for
digital or alarm pens cannot be edited.
To edit the vertical scale:
1 Click Edit Vertical Scale on the navigation toolbar. The Edit Vertical Scale
dialog box appears.
2 Click the Limits or Engineering Scale option. The Limits values displayed
are the current values used by the vertical scale. The Engineering Scale
values are obtained from the trend tag.
3 Enter a new Minimum value and Maximum value, and then click OK.
Reset to Default Span Use the Reset to Default Span button to reset the time span to the default time
span of the primary selected pen. The default span can be configured by using
the Property dialog box. For details, see “Configuring pen axes”.
24
Using Cursors
A cursor enables an Operator to determine the value of a pen at a given point in
time by dragging the cursor to the specific point on the pen line. A cursor label is
used to display the value.
An Operator can define many of the properties of cursors and cursor labels. For
details, see “Configuring Cursors”.
In this example the cursor intersects three pens; the cursor labels (the yellow
rectangles) display the corresponding pen values.
To move a cursor, drag the cursor line left or right. As the cursor moves, the
cursor labels move with the cursor and are updated continuously, reflecting the
position of the cursor.
Note: The cursor extends across all configured panes.
A line connects the cursor label to the associated pen line. The line has three
main states:
State Style Example
Intersection within pen data Line
To show/hide a cursor:
Click Show/Hide Cursor on the main toolbar. You can display additional
cursors by using the Properties dialog box.
You can display as many cursors as you want. To add a cursor, right-click the
root item (Process Analyst View) in the property tree in the Properties dialog
box, and choose Add Cursor.
The fields are displayed in the cursor label using the order defined above using
the format specified for the vertical axis. For example, if your vertical axis format
is “km/h”, the label reads “<value> km/h”.
26
The label displays the following values when the quality of the data is not good:
Cursor value Description
NA At the point of intersection the pen has no available data for display.
Gated At the point of intersection the pen’s data has been gated.
Disabled At the point of intersection the alarm tag of the pen was disabled.
The label value can also contain a directional indicator that functions as follows:
Cursor value Description
<value> -> The cursor is to the left of the first available sample for this pen.
<- <value> The cursor is to the right of the last available sample for this pen.
Pen line/pen The mouse pointer looks like this when the mouse is over a pen’s
background background and both horizontal and vertical scrolling are enabled. Clicking
and dragging at this point results in the free movement of the pen. Scrolling
the mouse wheel results in horizontal-only movement.
27
Adding Pens You use the Add New Pens dialog box to add a new pen to your trend display.
To display the Add Pens dialog box, click Add Pens on the main toolbar.
To add a new pen:
1 Select the Type of server you want to search: Trends or Alarms.
2 Type in a Tag Filter and/or Cluster Filter to apply to the search (optional).
If you leave either of the Filter text boxes blank, all tags or clusters of the
selected server type will be retrieved. The filters have basic wildcard and
Boolean search functionality. You can use the keywords AND, OR and NOT
with wildcard strings, as well as group Boolean terms using parentheses.
For example, entering 'L*' in the Tag Filter returns all tags beginning with
the letter “L” in all clusters. Entering ‘L* OR H*’ will find all tags beginning
with “L” or “H”. More complex examples include ‘L* OR (H* AND NOT
*G)’. This would return all tags that start with “L” or any that start with “H”,
but do not end in “G”.
3 Click Search. The search results are returned in the Search list. The results
are not sorted: the tags appear in the order they were configured in Vijeo
Citect.
The cluster associated with each tag is also displayed. The Process Analyst
displays only the tags in clusters that this client has access to. In a system
with more than one cluster, if a tag is not configured with a cluster, it is
listed once for each cluster.
The Search Result list displays a maximum of 100 entries at a time. If your
search returns more than 100 results, use the First, Prev, Next, and Last
buttons to navigate your search results.
28
4 Select one or more tags from the Search Results list. You can use the Ctrl
and/or Shift keys to select multiple tags.
5 Select the destination pens to Add Add pens to. Pens can be added to any
existing pane, or to a new pane.
6 Select a Pen Type. A trend tag can be represented by an analog or digital
pen. An alarm tag can be represented by an alarm pen only.
7 Select how to resolve the pen name:
Comment - applies the tag comment as the pen name. Note that if the
tag does not have a comment specified, a name is automatically
generated.
Tag - applies the tag name as the pen name.
Auto -applies an automatically generated name to the pen using the
format Pen<X> where X is an incremented number, starting with the
first available number.
8 Click Add. This moves all the selected items in the Search Results list into
the Selected Items list. The Selected Items list contains all the tags that will
be added as pens to the Process Analyst. You can perform multiple searches
to add tags into the Selected Items list.
Note: To remove a tag from the Selected Items list, highlight the item you
want to move, and then click Remove.
9 To view details about a selected tag, click Show Detail. The Pen Detail box
appears, showing defined information for the selected tag.
10 Click OK. Your selected tags appear on the trend display as pens.
See Also “Deleting Pens”
Deleting Pens Operators can delete pens from the trend display at any time.
Note: Deleting a pen is different than hiding the pen from display by using the
Visibility check box in the Object View. For details, see “Using Object View”.
To remove a pen:
1 Select the pen you want to delete.
2 Click Remove Pen in the main toolbar. The pen is deleted from the display.
3 Select the tag in the Selected Items list, and then click Show Detail. The Pen
Details dialog box appears, showing the system information for the selected
tag.
30
Chapter 5: Using the Object View
The Object View provides a structured view of the pens displayed in the Process
Analyst. You use the Object View to view information about the pens on the
chart, along with information about associated tags.
See Also “Object View Basics” | “Using Object View” | “Configuring the Object View”
By default, all items in the Object View are expanded (that is, all pens for all
panes are shown). Clicking a pen in the Object View selects that pen. There is
always one pen selected in each pane; in the example above, the primary
selected pen is highlighted in blue; all other selected pens are highlighted in
gray.
See Also “Pen Selection”
The Object View displays the following items:
Icon Object
Analog pen
Digital pen
Alarm pen
Pane
The check box controls whether the pen is visible on the chart. The gradient-
filled color box to the left of the pen name indicates the pen’s line color as it
appears on the chart.
32
The Object View always mirrors the items that are displayed on a chart. For
example, if you add a pane to the chart, a new pane is added simultaneously to
the Object View. Similarly, if a new pen is added to or deleted from a pane, or if
a pen’s properties are changed, these changes are reflected in the Object View.
The table below shows the predefined default columns, which are displayed in
addition to the object tree. These columns are arranged by default from left to
right in the Object View.
Column Description
Zero Scale Vertical axis start position of the pen.
Full Scale Vertical axis end position of the pen.
Engineering Units Engineering units associated with the pen.
You can configure the Object View to display other predefined columns that
show different information about your pens; for details, see “Configuring the
Object View”.
You can print detailed reports of your Process Analyst trends for management
reports and other purposes. You can configure Process Analyst reports to
include other print options designed to maximize the business value of your
reports. You can also export pen data to the Windows Clipboard or to Microsoft
Excel.
Note: For details about general print options in Windows, refer to your
Windows documentation.
See Also “About Process Analyst Reports” | “Configuring Process Analyst Report
Options” | “Exporting Pen Data”
This example shows a report of a chart titled Citect Process Analyst; the chart has
only one pane, which contains three analog pens. The topmost pen in the report
legend is highlighted, indicating that this pen is selected; consequently, the axes
shown in the report are associated with this pen. You can see that this pen is
selected in the chart by the “halo” effect surrounding the pen. The color boxes on
the left-hand side of the legend help you to distinguish between the pens.
To print a report:
Click Print. The Print dialog box appears. Click the Print button, or choose
Print from the right-click (context) menu.
Setting up report You can configure your reports to include report legends. The information in the
legends report legend is derived from the information properties of the underlying tag
that is associated with a pen. If there are no information properties defined for a
tag, this information isn’t available for a legend.
You set up your report legends by using the Legend panel of the Print dialog
box.
To set up a report legend:
1 In the Print dialog box, click the Legend tab. The Legend panel appears.
2 The panel shows, by default, the Pen Options, Statistical Analysis Options,
and Cursors lists (if there is a cursor currently displayed on the chart). The
options available to you might differ from the ones shown here.
3 Select the check box of the Pen Options you want to include in your report.
For details about these options, see “Configuring the Object View”.
4 Select the Statistical Analysis Options you want to include. Note that this
section is available only if the chart contains at least one analog or digital
pen.
Minimum - causes the minimum value from cache to be returned. Note
that this value might not be a real logged sample if the sample found is a
multiple calculated sample.
36
Setting up report You can configure your reports to include a report header, which can include a
options report title and comment. For multiple-page reports, you can include page
numbers, which appear at the bottom of each report page.
You set up your report options by using the Report panel of the Print dialog box.
To set up report options:
1 In the Print dialog box, click the Report tab. The Report panel appears.
2 In the Header Information area, type a Title for the report. If necessary,
include a Comment. Comments are printed under the report title on each
report page.
37
3 To include a header, make sure the Include Header check box is selected.
4 To include page numbering, make sure the Include Page Numbers check
box is selected.
5 Click Apply.
Export functionality doesn’t simply return the sample markers displayed on the
graph. Instead, it exports an interpolated value per display period from the start
time to the end time of the pen. The display period can be calculated by dividing
the time span of the pen by the
“IProcessAnalyst.NumberofSamples[Property][Get/Set]” property.
Before exporting the data, the Process Analyst sorts all the timestamps for all
pens from the earliest to the latest sample. When the pens are unlocked and have
different time spans, the data for each pen might have different timestamps. As
each entry is added to a row in the table, the value of the pen at that particular
timestamp is exported. If a pen does not have a sample for that timestamp, the
column for that pen is left blank.
An export will also write values of NA, GATED and all alarm states as localized
text when required.
Pen columns use the format <pane>-<pen> where pane is the name of the pane
that contains the pen, and pen is the name of the pen.
See Also “Copying data to the Clipboard” | “Copying data to file”
Copying data to the Copying pen data to the Clipboard allows you to paste the data into another
Clipboard application, such as an Excel spreadsheet.
To copy data to the Clipboard:
1 Select the pen(s) you want to copy data for.
2 Click Copy to Clipboard, or select Copy from the right-click (context) menu.
Copying data to file Copying pen data to Microsoft Excel allows you to manipulate the data using
spreadsheet application capabilities.
Notes
38
The Time column is an encoded (OLEDATE) double value, which holds the
date and time in seconds in local time. When exporting pen data to Excel,
you should change the format of the Time column to dd/mm/yyyy hh:mm:ss
so that the time is displayed correctly. Because the OLEDATE data type
excludes milliseconds, a separate column is provided, which exports the
millisecond component for each timestamp.
The results exported are in Unicode format. You should use Excel 2000 and
later, which support this format.
To copy data to file:
1 Select the pen(s) you want to copy data for.
2 Click Copy to File. The Save As dialog box appears.
3 Enter a filename and click Save. The data is exported in a delimited format.
4 Open the file you just created, and complete the Text Import Wizard.
Chapter 7: Configuring the Process Analyst
Many of the Process Analyst control’s properties can be configured at run time
to allow an Operator to customize the control to suit their working preferences.
To configure the Process Analyst, you use the Properties dialog box.
See Also “Using the Process Analyst Properties Dialog Box”
“Configuring Chart-wide Properties”
“Configuring Chart Panes”
“Configuring Pens”
“Configuring Cursors”
“Configuring Defaults”
“Configuring Toolbars”
“Configuring the Object View”
“Working with Views”
Main page You use the Main page of the Properties dialog box to configure general
properties and access the server path properties. The Main page looks like this:
The list on the left-hand side contains the property tree, a hierarchical list of
Process Analyst interface components. Selecting an item displays the property
40
controls for that component on the right. The pens in the property tree indicate
the information that the pen is trending.
The tasks you can perform vary depending on your privilege level: if you don’t
have the required privilege at run time to perform an action, that control is
disabled/removed. For example, the right-click menu removes the Add Pen
option at run time if you don’t have the privilege to add a pen. Commands that
are unavailable appear “grayed-out.” The right-click menu contains the
following options:
Right-click this item... Actions
Chart Add Pane - add a new pane.
Add Cursor - add a new cursor.
Pane Add Digital - adds a new digital pen.
Add Analog - adds a new analog pen.
Add Alarm - adds a new alarm pen.
Note: After adding a pen from this menu, configure the data connection by
clicking the Connection tab and typing the name of the tag into the Tag text box.
Delete - deletes the pane.
Pen Delete - deletes the pen.
Cursor Delete - deletes the cursor.
Toolbars You use the Toolbars page to configure the main toolbar and navigation toolbar.
Operators and Users can configure the toolbars at run time and design time. Use
the Toolbars page to configure the toolbars; for details, see “Configuring
Toolbars”.
Object View You use the Object View page to configure the Object View. Operators and Users
can select (at run time and design time) the columns they want to display, as
well as change the column width and display order. Users can define new
columns and edit existing columns at design time.
41
Configuring general You can configure general properties such as the background color of the chart,
properties the refresh rate, data request rate, number of samples for pens, and specify
whether chart pens should be locked. The Administration area indicates the
privilege setting for the current Operator.
To configure general properties:
1 Click the General tab on the Main page.
Configuring server You can configure the file server locations that the Process Analyst uses to load
paths and save Process Analyst views, and displays the current Vijeo Citect run path if
the Process Analyst is embedded in a running Vijeo Citect system. This
command is disabled at run time if you do not have the appropriate privilege.
For details about saving and loading views, see “Working with Views” and
“Process Analyst View Synchronization”.
The Process Analyst uses four possible storage locations:
User - maps to the client machine’s logged-in user’s My Documents folder.
This option is available for any possible privilege and Vijeo Citect mode.
Primary - User-definable.
Secondary - User-definable.
Local - displays the current Vijeo Citect run path (read-only). This text box
only gets populated when the Process Analyst is running in Vijeo Citect
V6.0 or higher. This path is an Analyst Views subdirectory under the Vijeo
Citect current Run directory.
To configure server paths:
1 Click the Server Paths tab on the Main page.
43
Note: To configure defaults for your panes, select the Pane item in the
Default Settings node of the property tree, not a specific pane.
2 Click the color swatch and select a new Background color.
3 Select a Height option:
44
Configuring Pens
The Process Analyst allows you to configure your pens to suit your preferences.
Pen configuration tasks are performed by using the Properties dialog box, which
is used for:
“Configuring pen appearance”
“Configuring pen gridlines”
“Configuring pen axes”
“Configuring pen quality”
“Configuring the pen data connection”
“Configuring cursor labels”
Configuring pen You use the Process Analyst Properties dialog box to configure the appearance
appearance of pens. Pen appearance can be configured at run time by Operators and Users
(and at design time by Users).
For details about pen appearance, see “Pen Types”.
Note: To configure default settings for pen appearance, select Analog, Digital,
or Alarm in the property tree under Default Settings, and then complete the
procedure below for the type of pen you want to configure.
Configuring pen You use the Process Analyst Properties dialog box to configure the gridlines for
gridlines a selected pen. Pen gridlines can be configured at run time by Operators, and at
design time by Users.
For more information about pen gridlines, see “Gridlines”.
Note: To configure defaults for pen gridlines, select the All pens item in the
property tree under Default Settings, and then complete the procedure below.
To configure pen gridlines:
1 Click the Main Page tab.
2 From the property tree list, select the pen you want to configure gridlines
for.
3 Click the Gridlines tab to display the gridlines property controls.
47
4 In the Vertical: Major area, select a Style, specify a Width, and then select a
Color.
5 In the Vertical: Minor area, select a Style, specify a Width, and then select a
Color.
6 In the Horizontal area (analog pens only), select a Style for the minor
gridline, specify a Width, and then select a Color for the major gridline.
7 Do the same if necessary for the minor gridline.
8 Click Apply.
Configuring pen axes You use the Process Analyst Properties dialog box to configure the axis of the
selected pen. A pen axis can be configured at run time by Operators, and at
design time by Users.
You can configure the color, line width, label type, scroll and scale properties for
the date/time and value axes. You can also choose whether to display time on
the date/time axis using local or UTC format.
For more information about pen axes, see “Date/Time (Horizontal) Axis” and
“Vertical (Value) Axis”.
Note: To configure defaults for pen axes, select the All pens item in the property
tree under Default Settings, and then complete the procedure below.
To configure a pen axis:
1 Click the Main Page tab.
2 From the property tree list, select the pen you want to configure axes for.
3 Click the Axis tab to display the axis property controls.
48
Note: The Scale and Scroll options are also available on the right-click
(context) menu.
15 Click Apply.
Configuring pen quality You use the Process Analyst Properties dialog box to configure the quality of the
selected pen. Pen quality can be configured at run time by Operators, and at
design time by Users.
Configuring the pen quality allows you to define the appearance of sample
markers on a selected pen, as well as the line styles of the pen, based upon the
quality of the data being trended by the Process Analyst.
For details about how the Process Analyst represents data quality, see “Data
Quality”.
To configure pen quality:
1 Click the Main Page tab.
2 Select the pen you want to configure.
3 Click the Quality tab to display the quality property controls.
4 To enable points for the pen to be visible, select the Points Visible option.
5 In the Point Styles area, select a Single point style to represent a single data
sample.
6 Select a Multiple point style to represent multiple data samples.
7 Selected an Interpolated point style for interpolated data samples.
8 In the Line Styles area, select a line style to represent a Good sample.
9 Select a line style to represent a Gated/Disabled sample.
10 Select a line style to represent an NA sample.
11 Click Apply.
50
Configuring the pen You use the Process Analyst Properties dialog box to configure the pen data
data connection connection. This allows you to define the server, trend tag, and request mode for
the selected pen.
Pen connection can be configured at run time by Operators and Users that have
the appropriate privileges.
To configure pen data connection:
1 Select the pen you want to configure.
2 Click the Connection tab to display the connection property controls.
Configuring cursor You use the Process Analyst Properties dialog box to configure the pen cursor
labels labels. Configuring the pen cursor labels allows you to specify the color used for
51
the lines, background, and text on the cursor label. Note that the information
shown on a cursor label is predefined and cannot be changed.
For details about cursor labels, see “Using Cursor Labels”.
Pen cursor labels can be configured at run time by both Operators and Users that
have the appropriate privileges.
To configure cursor labels:
1 Select the pen you want to configure.
2 Click the Cursor Label tab to display the connection property controls.
Configuring Cursors
You can configure the line width and line color of a selected cursor. Changes to
the cursor line color apply only to the currently selected cursor. For details on
cursors, see “Using Cursors”.
To configure the cursor:
1 In the property tree of the Citect Process Analyst Properties dialog box, click
the cursor you want to configure. The Appearance property controls appear.
52
Configuring Defaults
The defaults are a collection of properties that are inherited by each item (pane,
pen, cursor, and so on) when that item is created. These default properties are
maintained for the lifetime of the item until its properties are modified.
You configure these defaults in the same way as you configure the individual
components. The Default Settings node on the property tree contains the
following items:
All pens - configure the gridlines, axis, quality, connection, and cursor label
properties for all pen types. See “Configuring pen gridlines”, “Configuring
pen axes”, “Configuring pen quality”, “Configuring the pen data
connection”, and “Configuring cursor labels”.
Cursor - configure cursor defaults. See “Configuring Cursors”.
Analog - configure the appearance of analog pens. See “Configuring pen
appearance”.
Digital - configure the appearance of digital pens. See “Configuring pen
appearance”.
Alarm - configure the appearance of alarm pens. See “Configuring pen
appearance”.
Pane - configure the pane height and appearance defaults. See “Configuring
Chart Panes”.
53
Configuring Toolbars
The Process Analyst has two toolbars, the main toolbar and the navigation
toolbar. You use the Properties dialog box to configure the toolbars.
Adding or removing Operators can add or remove toolbar commands during run time.
toolbar commands To add or remove commands from a toolbar:
1 From the Toolbar menu, choose the toolbar you want to customize (Main
Toolbar or Navigation Toolbar).
2 To add a command to the toolbar: In the Available toolbar buttons list,
select the command you want to add to the toolbar, and then click Add. The
selected command moves to the Current toolbar buttons list.
The Available toolbar buttons list contains all the command buttons
available in your system, including predefined as well as user-defined
commands.
3 To remove a command from the toolbar: In the Current toolbar buttons
list, select the command you want to remove from the toolbar, and then click
Remove. The selected command moves to the Available toolbar buttons
list.
54
Changing the order of Operators can change the order of toolbar commands during run time.
toolbar commands To change the order of commands:
Select a command in the Current toolbar buttons list and click Move Up or
Move down to move the selected command up or down the list as required.
For information on columns that are displayed by default, see “Object View
Basics”.
Object View properties The Object View properties page allows you to show or hide existing columns,
page create custom columns, edit existing columns, and re-order columns.
55
The Properties page displays all the available columns for the Object View and
their properties:
NameID - Internal identifier, which must be unique.
Width - Default width of the column in pixels.
Display Text - Title displayed in the column header.
The check boxes in the NameID column are bound to a column’s visibility: a
column is visible only if the associated checkbox is selected.
The Move Up and Move Down buttons to the right of the Available Columns
list box allow you to reorder columns. The order of the columns from top to
bottom in the list dictates their display order from left to right in the Object
View. Clicking Move Up or Move Down shifts the currently selected item up or
down respectively.
See Also “Creating or Editing Object View Columns”
Saving a view A Process Analyst view stores the trends and alarms that are being displayed,
the columns being viewed in the Object View, the toolbar buttons that are
available, as well as the “look and feel” of the view.
To save a view:
1 On the main toolbar, click Save View. The Save Process Analyst View dialog
box appears, showing the location where you can save views.
Loading a view When loading a view, the start time and end time of a view is restored only
autoscroll is off. If autoscroll is on, pens are synchronized to “Now.”
When loading a view, the only locations that are available (My Documents,
Primary, and Standby) are those that have been configured by your
administrator.
To load a view:
1 On the main toolbar, click Load View. The Load dialog box appears.
57
2 Select a view to load, and then click OK. The view is loaded.
58
Chapter 8: Operator Command Reference
You use the toolbar commands on the main toolbar and navigation toolbar to
perform commonly used functions for viewing and interacting with Process
Analyst data, such as adding or removing pens, displaying cursors, and so on.
Process Analyst has predefined commands, grouped into the following
categories:
“View Commands”
“Zoom Commands”
“Navigation Commands”
“Export Commands”
“Interface Commands”
“General Commands”
The toolbars in your run time environment might have been customized during
implementation, so not all these commands might appear on your toolbars.
Additionally your toolbars might have custom commands not described here.
The tables describe the default set of commands delivered with the Process
Analyst.
View Commands
The Process Analyst has the following view commands by default:
Icon Tooltip Description
Save View Displays the Save File dialog box allowing an Operator to save a Process
Analyst view to a specified location. For details, see “Saving a view”.
Load View Displays the Load View dialog box allowing the operator to specify a view
to load. For details, see “Loading a view”.
Zoom Commands
The Process Analyst has the following zoom commands by default:
Icon Tooltip Description
Toggle Box Zoom Toggles the Process Analyst into box zoom mode. The mouse cursor
changes to a crosshair used to define an area to zoom in on. Zoom may
be cancelled by right-clicking or toggling the Zoom command off. For
details, see “Toggle Box Zoom”.
Zoom in 50% Executes a horizontal and vertical zoom in of 50% of the current span(s)
of the pen(s). For details, see “Zoom In/Zoom Out”.
Zoom out 50% Executes a horizontal and vertical zoom out of 50% of the current
span(s) of the pen(s). For details, see “Zoom In/Zoom Out”.
60
Reset to Default Span Restores the pen(s) spans to their original default settings. For details,
see “Reset to Default Span”.
Edit Span Displays the Edit Span dialog box allowing an operator to explicitly enter
a time span to apply to the display. For details, see “Edit Span”.
Edit Vertical Scale Enabled when an analog pen is selected. For details, see “Edit Vertical
Scale”.
See Also “View Commands” | “Navigation Commands” | “Export Commands” |
“Interface Commands” | “General Commands”
Navigation Commands
The Process Analyst has the following navigation commands by default. For
details about these commands, see “Navigating time”.
Icon Tooltip Description
Toggle Span Lock Toggles the locking of the time span. A time span is the “distance” in time
between the start time and end time of the chart. For details, see “Span
Lock”.
Back One Span Moves the pen(s) back in time exactly one time span. For details, see
“Navigating time”.
Back Half a Span Moves the pen(s) back half a span. For details, see “Navigating time”.
Forward One Span Moves the pen(s) forward in time exactly one span. For details, see
“Navigating time”.
Forward Half a Span Moves the pen(s) forward half a span. For details, see “Navigating time”.
Synchronize to Now Synchronizes pen(s) such that the end date time reflects “now” which is
positioned on the right-hand edge of the screen. “Now” is calculated
using the current system time. For details, see “Synchronize to Now”.
Toggle Auto-Scrolling Toggles the automatic scrolling off and on for all pens. For details, see
“Toggle Autoscrolling”.
Export Commands
The Process Analyst has the following export commands by default:
Icon Tooltip Description
Export to File Copies visible pens to an Excel compatible file. For details, see “Copying
data to file”.
Copy to Clipboard Copies visible pens to the clipboard.Interface Commands. For details, see
“Copying data to the Clipboard”.
Interface Commands
The Process Analyst has the following interface commands by default:
Icon Tooltip Description
Show/Hide Cursor Toggles the display of cursors. For details, see “Using Cursors”.
Show/Hide Cursor Labels Toggles the display of cursor labels. Enabled only when a cursor is
visible and when a pen exists. For details, see “Using Cursor
Labels”.
Show/Hide Points Toggles the display of points representing where sample data was
recorded in the archive. For details, see “Pens: An Overview”.
Lock/Unlock Cursor Labels Toggles the locking/unlocking of cursor labels. Enabled only when a
cursor is visible and when a pen exists. For details, see “Using
Cursor Labels”.
Lock/Unlock Pens Toggles the locking/unlocking of pens. For details, see “Locking/
Unlocking Pens”.
Add Pane Adds a new pane to the view. For details, see “Configuring Chart
Panes”.
Remove Pane Removes the pane of the primary selected pen. A dialog confirms
the delete. For details, see “Configuring Chart Panes”.
Autoscale Vertical Axis for Toggles autoscaling for the selected pen on a per-pen basis. For
Analog Pens details, see “Scaling the Chart”.
Lock/Unlock Vertical Axis Toggles interactive scrolling of the vertical axis and disables
Scrolling autoscaling. For details, see “Scrolling the Chart”.
See Also “View Commands” | “Zoom Commands” | “Navigation Commands” | “Export
Commands” | “General Commands”
General Commands
The Process Analyst has the following general commands by default:
Icon Tooltip Description
Add Pen Displays the add pen dialog. For details, see “Adding Pens”.
Remove Pen Removes the selected pen from the display. For details, see “Deleting
Pens”.
Toggle Object View Toggles the display of the Object View. For details, see “Using the Object
View”.
Print Displays the print dialog, allowing the user to print the current state of the
Process Analyst. For details, see “Printing and Exporting”.
Refresh Data Refreshes the data for the selected pen, or all pens (if locked).
Show Properties Displays the Process Analyst Properties dialog box. For details, see “Using
the Process Analyst Properties Dialog Box”.
Help Displays the Process Analyst Help.
This section contains information for Users and describes the following:
“Integration with Vijeo Citect”
“Configuring Process Analyst Design Time Properties”
“Using the Process Analyst Command System”
“Automation Model”
Chapter 9: Integration with Vijeo Citect
The Process Analyst integrates seamlessly into the Vijeo Citect system and is
designed to work primarily with the Vijeo Citect Graphics Builder and the run
time environment. But the Process Analyst can also be embedded in custom
Visual Basic and .NET applications. In these situations Vijeo Citect is still
required.
See Also “Configuring the Process Analyst Control from Graphics Builder” | “Security
and Permissions” | “Multi-language Support” | “Persistence” | “Backing up
Projects”
After inserting the Process Analyst into a page, you can resize it into position. To
view the configuration pages for the Process Analyst, double-click the Process
Analyst control. For details on configuring the design time properties for the
Process Analyst, see “Configuring Process Analyst Design Time Properties”.
See Also “Persistence”
Tag association Vijeo Citect can bind a Vijeo Citect tag to an ActiveX property and update either
the tag or the property, based on a specified ActiveX event. You should note that
the Process Analyst control does not support this feature.
then become available. The Process Analyst also supports the Vijeo Citect
Hierarchical Privilege security option.
Security can be applied to the following features:
Administration; for details, see “Administration privilege”.
Commands; for details, see “Command privilege”.
Saving Process Analyst views (write privilege); for details, see “Write
privilege”.
Administration privilege The Process Analyst also uses an Administration privilege level to disable
engineer-oriented features at run time. For example, the ability to add new
custom commands and so on are all disabled if the Operator does not meet the
required privilege level. The Administration privilege level should never be zero
on a running system as this would expose properties to an Operator, which
could adversely affect the performance of the client and/or server (e.g., Number
Of Samples property).
The features that are disabled when an operator does not meet the
Administration privilege level include:
Add Pen context menu in Property dialog box.
New/Edit/Delete command (includes changing the privilege of commands).
New/Delete Column.
Data Refresh Rate property.
Display Refresh Rate property.
Number Of Samples property.
Server Paths tab.
Server field on Connection tab.
Tag field on Connection tab.
To modify the Administration privilege level, see “Configuring Chart-wide
Properties”.
Command privilege The Process Analyst allows a privilege level to be assigned to each command
(standard or custom command). If an Operator does not have the required
privilege level to use that command, the associated toolbar button is disabled
and cannot be executed.
See Also “Editing Existing Custom Commands”
Write privilege The Process Analyst uses a concept of “write” privilege level to control whether
an operator can save Process Analyst views to a location other than "My
documents". These views can then be loaded into the Process Analyst later by
any Operator. The write privilege is set at design time on the Server Paths
property page located on the root Process Analyst node in the Property pages
dialog box. If the write privilege level is set to zero (0), any operator can save to
any location. If the write privilege is any other level, the Operator must have that
67
privilege level to be able to save an Analyst view to a location other than "My
Documents".
See Also “Configuring server paths” | “Working with Views” | “Process Analyst View
Synchronization”
Multi-language Support
The Process Analyst supports the Vijeo Citect multilanguage ability of changing
the user interface language dynamically at run time. If the language is changed
in Vijeo Citect, the Process Analyst will change its language to match.
The process of configuring the Process Analyst for multiple languages is
different from that of Vijeo Citect. This section describes how to localize the
Process Analyst user interface and get it to work with Vijeo Citect.
Understanding the The Process Analyst uses a special file, called Resources.dll, to store all of its
Process Analyst display strings and dialog boxes. This file holds the native translations for your
version of the Process Analyst; these native translations are considered the
resources
default language. For example, the Japanese version of the Process Analyst will
contain Japanese resources inside the Resources.dll file.
A separate Resources.dll file must be created for each individual language that
you want to support in your system. The file should be renamed using a special
format to indicate the language. The Process Analyst expects the file to be
named Resources_<LanguageCode>.dll, where <LanguageCode> is the unique
identifier of your dll.
For example, if you are creating French resources, your dll should be named
Resources_fr.dll. Vijeo Citect uses the RFC 1766 standard for specifying culture
names.
See Also “Creating your own Process Analyst resource.dll”
All language Resources*.dll files must be placed in the same directory as the
Analyst.dll file.
The example below shows a system that contains English as the default, and has
alternative languages of French, German and Chinese.
Resources.dll (default - any language, e.g. English)
Resources_fr.dll (French standard)
Resources_zh-CN.dll (Chinese PRC)
Resources_de.dll (German)
Using Vijeo Citect to Vijeo Citect uses the Cicode function SetLanguage to switch languages at run
switch the Process time. To allow the Process Analyst to determine the language it should display,
you must map your Vijeo Citect language databases to the Process Analyst
Analyst language
resource files.
To do this, add a new .ini section called [ProcessAnalyst] to the Citect.ini file
on all your Vijeo Citect clients and servers, and create a mapping for each
language. (Note that this section might already exist in your Citect.ini file.) The
mapping must use this format:
68
LanguagePath.<dbf>=<ProcessAnalystLanguage>
where <dbf> is the name of a specific Vijeo Citect language translation database,
and <ProcessAnalystLanguage> is the language code of the resources.dll file
that has the equivalent translations.
For example,
[ProcessAnalyst]
LanguagePath.French=fr
LanguagePath.Chinese=zh-CN
LanguagePath.German=de
The last step is to ensure each of your machines contains the necessary language
fonts. Windows XP and Windows 2000 both provide facilities to add the
necessary languages to your machine via the Regional and Language Options
dialog box, accessible from the Control Panel. This step is essential if you want
to use Asian languages on an English operating system. See “Creating your own
Process Analyst resource.dll” for details on adding languages to your system.
With the .ini file now configured, languages installed, and the Resource.dll files
in place when the SetLanguage Cicode function is called, Vijeo Citect and the
Process Analyst will automatically change into the selected language.
Manually switching The Process Analyst can also switch languages by itself using the
languages IProcessAnalyst.Language property. You can call this property directly from
Cicode, for example.
Note: Using this method will only switch the Process Analyst language and not
the one used by Vijeo Citect. See “IProcessAnalyst.Language [Property] [Get/
Set]”.
Specifying languages A Process Analyst running inside a Vijeo Citect Web Client also supports run
for the Web Client time language switching, but you must configure the languages that the Web
Client will download to the client machine.
To configure the languages to download:
1 Create a zip file in the Vijeo Citect \bin folder called bin.zip.
2 Add to the zip file all the language resource DLL files that you want the
client to download and use. (You can find these files in your \Program
Files\Common Files\Citect folder.)
Note: The bin.zip file and its contents are not version-checked. This means
you must manually remove the bin.zip from the Web Client machines if
your server contains a more recent bin.zip file. To do this:
1 Find the installation directory of the Analyst.dll file on your Web Client
machines and look for a file called bin.zip in this directory.
2 Delete this file.
3 Reconnect to the Web server to download the latest bin.zip file.
Creating your own To create your own resources dll, you need to do the following:
Process Analyst 1 Install the specific languages you are localizing on your Windows system.
resource.dll 2 Set your system to use that specific language.
69
Note: To create your own resources.dll file, you’ll need to use Microsoft
Developer Studio 6 or an equivalent tool.
6 In the Installed services section, ensure that the language you want to
localize with is listed. If not, add it.
1 To add a language, click Add to display the Add Input Language dialog
box.
2 Select the language you want from the Input language menu and click
OK. (You might need your original Windows Installer CD.)
3 You might need to restart your system before the language is available.
If not, click Apply and then OK to close the Text Services and Input
Languages dialog box and return to the main window under the
70
Languages tab. If you need to restart your system, return to the Regional
and Language Options dialog box after logging back into Windows. Be
sure to login as an Administrator.
7 Click the Advanced tab in the Regional and Language Options dialog box.
8 Select the language you want from the menu in the Language for Non-
Unicode Programs section.
9 Click Apply and then OK (you may need to restart your system).
4 Ensure that your language is listed in the Installed input locals list.
5 Click back to the General tab.
6 Click Set default to display the Select System Locale dialog box.
7 From this list, select the language that you want to localize to and click OK.
This step is essential if you are using Asian characters on an English system.
(This may require a system restart.)
Note: When you are finished localizing, you should switch this option back to its
original setting.
2 Select the language you want to use (to work correctly with Visual Studio,
this should match the language you selected in Step 8 of the Windows XP
setup and Step 7 of the Windows 2000 setup). This might display a
language-specific IME editor, which allows you to select characters to use in
your translations.
7 Save the file under a new name. For example, if you are localizing for
Japanese, use Resources_ja-JP.dll. See “Understanding the Process Analyst
resources” for naming conventions.
8 Before changing any string, you must change the language code for each
dialog box and the string table by doing the following:
1 Expand the String Table folder in the tree.
2 Right-click the String Table entry.
3 Choose Properties from the right-click (context) menu (see below).
4 From the Language menu, select the language that you are localizing
for.
5 Click Close in the top-right corner of the dialog.
6 Repeat these steps for each of the dialogs inside the Dialog folder.
Once the language code has been set for all dialogs and the string table, you are
ready to begin changing the text.
Localizing dialog boxes To localize a dialog box, do the following:
1 Expand the Dialogs folder in the tree.
2 Double-click a dialog to edit.
3 Select an item of text and right-click to display the properties for that item.
4 Enter your replacement text into the Caption field.
5 Click the Close button in the top-right corner of the dialog box.
You should note the following:
73
Persistence
Persistence refers to saving the state (properties, pens, and so on) of the Process
Analyst to disk. Vijeo Citect and the Process Analyst provide the following
methods of persistence:
Saving as part of a Citect Graphics Builder page (design time)
Save View toolbar button on the Process Analyst (run time)
SaveToFile automation method on the Process Analyst (run time)
Saving between Citect page transitions (run time)
Saving while using the This feature allows you to configure the default look and/or what pens will be
Citect Graphics Builder displayed on the Process Analyst at design time while you are designing your
graphics pages. Design time is the appropriate time to configure the appearance
properties, toolbar buttons and, most importantly, the security of the Process
Analyst since these will become the default settings of the Process Analyst when
your page is displayed at run time.
When a page containing the Process Analyst is saved in the Graphics Builder all
the properties you configured on the Process Analyst will be stored within the
Graphics Builder page.
Note: When defining new custom toolbar buttons, any icon you assign will be
copied and also stored within the Graphics Builder page. This allows your
custom toolbar buttons to work on any machine.
Using the Save View This feature is valid only at run time and allows operators to save the current
toolbar button state of the Process Analyst (called a view) to a standalone file. These files can be
loaded during run time, and are an efficient way to store commonly used pen
configurations.
74
Using the SaveToFile This feature is valid only at run time and allows a user to write Cicode to save
automation method the current state of the Process Analyst to a standalone file, referred to as an
Analyst view. These files can be loaded during run time using the
LoadFromFile automation method (or the Load View toolbar button). Views
and are an efficient way to store commonly used pen configurations.
Saving between Vijeo Using Vijeo Citect run time, if you modify the Process Analyst (for example,
Citect page transitions changing the timespan of a pen) and move off the page, your changes will be
lost. This behavior is not always what you want, so the Citect Graphics Builder
(Run-time)
provides an option Persist ActiveX data between page transitions to save the
state of an ActiveX control when you switch between pages.
Enabling this option causes Vijeo Citect to write a temporary file to the Vijeo
Citect Data directory in the format of <Event class>.stg whenever you leave a
page that contains an ActiveX object (e.g., the Process Analyst). When you
reenter the page, Vijeo Citect looks for that same file and, if found, will load the
settings from it. These files only exist while Vijeo Citect run time is running.
When you shut down Vijeo Citect, the temporary *.stg files are deleted.
To save between page transitions:
1 Double-click the Process Analyst ActiveX control you want to change. The
Properties dialog box appears.
2 Click the Access tab.
3 Click the Identification tab. The Identification panel appears.
4 In the Persistence area, select the Persist ActiveX data between page
transitions check box, and then click Apply.
Resetting back to the You can reset the original configuration of the Process Analyst control by calling
default state the Cicode function ObjectResetState. This function takes the object handle of
the Process Analyst control, which you retrieve by using the Cicode function
ObjectByName.
75
Backing up Projects
When you save views to the Local storage location, the Process Analyst will
create a *.pav file in an Analyst Views subfolder under your project directory. If
your project contains Analyst views, you should ensure that the Save sub-
directories option is selected in Citect Explorer before backing up your project.
76
Chapter 10: Configuring Process Analyst
Design Time Properties
Most Process Analyst properties can be defined or modified during run time
and design time. This section describes properties that can be configured only
during design time, usually by a User.
For information about configuring run time properties, see “Using the Process
Analyst Properties Dialog Box”.
See Also “Adding New Commands” | “Editing Existing Custom Commands” |
“Creating or Editing Object View Columns” | “Process Analyst View
Synchronization”
2 The dialog shows the unique, system-generated ID for the new command. If
necessary, enter a new ID for the command. This ID can be used in Cicode
to determine which command has been triggered or to find a specific
command in the Vijeo Citect system.
78
3 Enter the Tooltip text for the new command. You are limited to 64
characters. Tooltip text appears when the mouse pointer is over the toolbar
command.
4 Click Browse and navigate to the icon to represent the new command. The
icon image appears on the toolbar command button.
5 To define how the command behaves, choose a button style from the Button
style menu:
Push Button - click the Enabled check box to set the default appearance
of the button when the button is enabled or disabled.
Toggle Button - click Enabled or Pressed to specify the “on”
appearance.
See Also “Editing Existing Custom Commands”
3 If required. click Browse to navigate to a new icon to use for the command.
4 If required, edit the Tooltip text. The maximum length for Tooltip text is 64
characters.
5 If required, choose a new button style from the Button style menu.
See Also “Adding New Commands”
79
3 Enter a Name ID for the column. The value is used to reference the column
in code.
4 Specify a Width.
5 Enter the Text to use for the column in the Object View display.
To delete an Object View column:
Select the column you want to delete and click Delete.
To edit an Object View column:
1 Select the column you want to edit, and then click Edit. The Edit Column
dialog box appears.
2 Modify the information as required, and then click OK.
See Also “Configuring the Object View”
loads a Process Analyst view, only that view on the Primary and Standby server
locations will be synchronized to ensure they are all the same.
The table below outlines the rules of synchronization and privilege for the
storage locations and client modes when loading and saving Process Analyst
views.
Action Vijeo Citect mode Privilege Available Storage Locations*
Load Normal client Both** The Primary and Standby options appear as configured
as well as My Documents. If either are invalid or
unavailable paths, they do not appear. If both are invalid
or unavailable, the Local option appears. Default order is
Primary, Standby, My Documents, and Local, My
Documents respectively. Synchronization occurs when
loading from a Primary or Standby location.
Load Web client Both** The Local and My Documents options are the only ones
available. Local maps to the project directory\Analyst
Views. The default order is Local, My Documents.
Save Normal client Privileged The Local and My Documents options are the only ones
available. Local however will attempt to save to all server
locations as well as the project directory. The .pav file will
be saved to all available locations from primary, standby
and project directories. Default order: Local, My
Documents.
Save Normal client Unprivileged The My Documents option is the only one available.
Save Normal client Both** The My Documents option is the only one available.
* Refers to the Look in menu on SaveView and Load View dialog boxes.
** Means both privileged and un-privileged.
When setting up file-servers to store Process Analyst views, ensure that each
client machine has privileges enabling it the desired read/write access to those
locations.
See Also “Configuring server paths” | “Working with Views” | “Write privilege”
Chapter 11: Using the Process Analyst
Command System
This section describes how to use the Process Analyst command system.
See Also “Command System Overview” | “Custom Commands” | “Icons”
Custom Commands
Custom commands are defined in the Process Analyst, but must be
implemented in Cicode. You define commands by using the ICommandSystem-
> Create method, or by using the New button on the Toolbar property page.
To implement the command, you must respond to the event CommandExecuted
(and optionally UpdateCommand). Both of these events notify you of the ID of the
command which needs to be handled.
CommandExecuted When an operator presses the toolbar button representing your command, it will
trigger this event. This is your opportunity to execute the desired functionality
of the command. This will not be triggered if the logged-in user fails to meet the
required privilege level. Be aware that this is an asynchronous operation.
UpdateCommand When the Process Analyst requires the Enable state or pressed states of its
toolbar buttons to be refreshed, this event will be triggered. This will not be
triggered if the logged-in user fails to meet the required privilege level. Note
that this is asynchronous operation.
The state of all commands (custom and pre-defined) will be saved to disk
whenever the Process Analyst configuration is saved.
See Also “Persistence”
Icons
For custom commands, the user can specify their own custom icons by pointing
to a file on their hard drive. As these files may be deleted or moved over time,
the Process Analyst makes an instant copy of the icon into memory when the
82
command is added. This removes any dependence on the original icon file.
When the Process Analyst configuration is saved, the icon data is also saved.
Chapter 12: Automation Model
Execution Results
Each property and method listed in the automation model will return one of the
following results upon execution. The exact meaning is described in the
Execution Result section for each property or method.
Execution Result Cicode VBA C++
InvalidArgument 274 5 E_INVALIARG
GeneralFailure 356 2147500037 E_FAIL
PathNotFound 356 76 STG_E_PATHNOTFOUND
Success 0 - S_OK
Errors are captured differently in Cicode and VBA. The following code
examples show how to trap and handle errors in VBA and Cicode.
[VBA]
Sub VBATest(myObject As Object)
On Error Goto errHandler
myObject.<function>
84
Exit Sub
errHandler:
Print Err.Number, Err.Description
Resume Next
End Sub
[Cicode]
FUNCTION Test1(OBJECT hObject)
ErrSet(1); // Enable User error checking (disabled HW alarm)
IF ObjectIsValid(hObject) THEN
_ObjectCallMethod(hObject, "<function>");
error = IsError();
errorMessage = IntToStr(error)
IF (error <> 0) THEN
Message("An error occured", errorMessage, 0);
END
END
ErrSet(0); // Enable hardware alarm reporting of errors
END
Interfaces
IAlarmPen Interface
IAnalogPen Interface
ICommand Interface
ICommandSystem Interface
ICursors Interface
IDigitalPen Interface
IObjectView Interface
IObjectViewColumn Interface
IObjectViewColumns Interface
IObjectViewItem Interface
IObjectViewItems Interface
IObjectViewPenItem Interface
IPane Interface
IPanes Interface
IPen Interface
IPens Interface
IProcessAnalyst Interface
IToolbar Interface
IToolbars Interface
IToolbarButton Interface
IToolbarButtons Interface
ITrendCursor Interface
Events
CommandExecuted [Event]
CursorMoved [Event]
Error [Event]
HorizontalAxisChanged [Event]
MouseClick [Event]
MouseDoubleClick [Event]
OVColumnAdded [Event]
OVColumnRemoved [Event]
OVItemAdded [Event]
85
OVItemChecked [Event]
OVItemSelected [Event]
PenCreated [Event]
PenDeleted [Event]
PenRenamed [Event]
PenSelectionChanged [Event]
PropertyChanged [Event]
UpdateCommand [Event]
VerticalAxisChanged [Event]
Enumerations
AlarmType [Enumeration]
AxisLabelType [Enumeration]
ErrorNotifyCode [Enumeration]
FileLocation [Enumeration]
HatchStyle [Enumeration]
LineStyle [Enumeration]
LineType [Enumeration]
PenNameMode [Enumeration]
PenType [Enumeration]
PointType [Enumeration]
QualityCompactionType [Enumeration]
QualityType [Enumeration]
RequestMode [Enumeration]
ToolbarButtonType [Enumeration]
IAlarmPen Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IAlarmPen
Methods (6)
IAlarmPen.GetFillColor [Method]
IAlarmPen.SetFillColor [Method]
IAlarmPen.GetHatchColor [Method]
IAlarmPen.SetHatchColor [Method]
IAlarmPen.GetHatchStyle [Method]
IAlarmPen.SetHatchStyle [Method]
Properties (3)
IAlarmPen.LineColor [Property][Get/Set]
IAlarmPen.LineWidth [Property][Get/Set]
IAlarmPen.AlarmType [Property][Get/Set]
IAlarmPen.LineColor Gets or Sets the color that will be used to draw the pen line.
[Property][Get/Set] Defined As
[VBA] Long LineColor
[Cicode] INT LineColor
86
IAlarmPen.LineWidth Gets or sets the width in pixels of the pen line when it is drawn.
[Property][Get/Set] Defined As
[VBA] Long LineWidth
[Cicode] INT LineWidth
[C++] int LineWidth
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted the return value will be GeneralFailure.
Limits
Minimum = 0
Maximum = 8
Calling Syntax
87
This example assumes there is a valid alarm pen object to be passed into the
example methods.
[VBA]
Sub Example(alarmPen As Object)
Dim lineWidth As Long
‘Getting Property value
lineWidth = alarmPen.LineWidth
‘Setting Property value
alarmPen.LineWidth = 5
End Sub
[Cicode]
FUNCTION Example(OBJECT hAlarmPen)
// Getting property value
INT nLineWidth = _ObjectGetProperty(hAlarmPen, "LineWidth");
// Setting property value
_ObjectSetProperty(hAlarmPen, "LineWidth", 5);
END
IAlarmPen.GetFillColor Gets the color used to fill the pen for the specified state.
[Method] Defined As
[VBA] GetFillColor(state as Long) as Long
[Cicode] INT GetFillColor(INT state)
[C++] HRESULT GetFillColor(int state, OLE_COLOR* color)
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Parameters
state
[in] The state for which fill color to retrieve (0 to 8).
Remarks
The color value can be calculated using the following formula: color = (65536 *
Blue) + (256 * Green) + (Red). Where red, green and blue are 0-255.
Calling Syntax
This example assumes there is a valid AlarmPen object to be passed into the
example methods.
[VBA]
Sub Example(alarmPen As Object)
Dim fillColor As Long
fillColor = alarmPen.GetFillColor(0)
End Sub
[Cicode]
FUNCTION Example(OBJECT hAlarmPen)
INT nFillColor = _ObjectCallMethod(hAlarmPen, “GetFillColor” ,
0);
END
IAlarmPen.SetFillColor Sets the color used to fill the pen for the specified state.
[Method] Defined As
[VBA] SetFillColor(state as Long, color as Long)
[Cicode] INT SetFillColor(INT state, INT color)
[C++] HRESULT SetFillColor(int state, OLE_COLOR color)
Parameters
state
[in] The state for which you would like to assign a fill color (0 to 8).
89
color
[in] The fill color that you would like used to for this specific state.
Execution Result
If the function succeeds, the return value will be Success. If the state is out of
range, the return value will be InvalidArgument. If the pen is deleted, the return
value will be GeneralFailure.
Remarks
The color value can be calculated using the following formula:
color = (65536 * Blue) + (256 * Green) + (Red)
where red, green, and blue are 0-255.
Calling Syntax
This example assumes there is a valid AlarmPen object to be passed into the
example methods.
[VBA]
Sub Example(alarmPen As Object)
Dim fillColor As Long
‘Setting FillColor to Red
alarmPen.SetFillColor(0, 255)
End Sub
[Cicode]
FUNCTION Example(OBJECT hAlarmPen)
// Setting FillColor to Red
_ObjectCallMethod(hAlarmPen, “SetFillColor” ,0, 255);
END
IAlarmPen.GetHatchCol Gets the color used to draw the outline and hatching for the specified state.
or [Method] Defined As
[VBA] GetHatchColor(state as Long) as Long
[Cicode] INT GetHatchColor(INT state)
[C++] HRESULT GetHatchColor(int state, OLE_COLOR* color)
Execution Result
If the function succeeds, the return value will be Success. If the state is out of
range, the return value will be InvalidArgument. If the pen is deleted, the return
value will be GeneralFailure.
Parameters
state
[in] The state for which hatch color to retrieve (0 to 8).
Remarks
The color value can be calculated using the following formula:
color = (65536 * Blue) + (256 * Green) + (Red)
90
IAlarmPen.SetHatchCol Sets the color used to draw the outline and hatching for the specified state.
or [Method] Defined As
[VBA] SetHatchColor(state as Long, color as Long)
[Cicode] INT SetHatchColor (INT state, INT color)
[C++] HRESULT SetHatchColor (int state, OLE_COLOR color)
Parameters
state
[in] The state for which you would like to assign a hatch color (0 to 8).
color
[in] The color that you would like to be used for a specified states hatch.
Execution Result
If the function succeeds the return value will be Success. If the state is out of
range then the return value will be InvalidArgument. If the pen is deleted the
return value will be GeneralFailure.
Remarks
The color value can be calculated using the following formula:
color = (65536 * Blue) + (256 * Green) + (Red)
where red, green, and blue are 0-255.
Calling Syntax
This example assumes there is a valid AlarmPen object to be passed into the
example methods.
[VBA]
Sub Example(alarmPen As Object)
Dim hatchColor As Long
‘Setting HatchColor to Red
alarmPen.SetHatchColor(0, 255)
End Sub
91
[Cicode]
FUNCTION Example(OBJECT hAlarmPen)
// Setting HatchColor to Red
_ObjectCallMethod(hAlarmPen, “SetHatchColor”,0, 255);
END
IAlarmPen.GetHatchStyl Gets the hatch style used when drawing the boxes for the specified state.
e [Method] Defined As
[VBA] GetHatchStyle(state as Long) as Long
[Cicode] INT GetHatchStyle(INT state)
[C++] HRESULT GetHatchStyle(int state, HatchStyle* color)
Parameters
state
[in] The state for which you would like to retrieve a hatch style (0 to 8).
Execution Result
If the function succeeds the return value will be Success. If the state is out of
range then the return value will be InvalidArgument. If the pen is deleted the
return value will be GeneralFailure.
Remarks
The color value can be calculated using the following formula: color = (65536 *
Blue) + (256 * Green) + (Red). Where red, green and blue are 0-255.
See Also IAlarmPen.GetHatchStyle [Method]
Calling Syntax
This example assumes there is a valid AlarmPen object to be passed into the
example methods.
[VBA]
Sub Example(alarmPen As Object)
Dim hatchStyle As Long
hatchStyle = alarmPen.GetHatchStyle(0)
End Sub
[Cicode]
FUNCTION Example(OBJECT hAlarmPen)
INT nHatchStyle = _ObjectCallMethod(hAlarmPen, “GetHatchStyle”, 0);
END
IAlarmPen.SetHatchStyl Sets the hatch style used for drawing the specified state.
e [Method] Defined As
[VBA] SetHatchStyle(state as Long, HatchStyle as Long)
[Cicode] INT SetHatchStyle (INT state, INT hatchStyle)
[C++] HRESULT SetHatchStyle (int state, HatchStyle hatchStyle)
Parameters
92
state
[in] The state for which you would like to assign a hatch style.
hatchStyle
[in] The hatch style that will be used for the specified state.
Execution Result
If the function succeeds the return value will be Success. If the state is out of
range then the return value will be InvalidArgument. If the pen is deleted the
return value will be GeneralFailure.
Remarks
The color value can be calculated using the following formula: color = (65536 *
Blue) + (256 * Green) + (Red). Where red, green and blue are 0-255.
See Also IAlarmPen.GetHatchStyle [Method]
Calling Syntax
This example assumes there is a valid AlarmPen object to be passed into the
example methods.
[VBA]
Sub Example(alarmPen As Object)
‘Setting HatchStyle
alarmPen.SetHatchStyle(0, 1)
End Sub
[Cicode]
FUNCTION Example(OBJECT hAlarmPen)
// Setting HatchStyle
_ObjectCallMethod(hAlarmPen, “SetHatchStyle” ,0, 1);
END
IAnalogPen Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IAnalogPen
Methods (0)
Properties (3)
See Also IAnalogPen.LineColor [Property][Get/Set]
IAnalogPen.LineInterpolation [Property][Get/Set]
IAnalogPen.LineWidth [Property][Get/Set]
IAnalogPen.LineColor Gets or Sets the color that will be used to draw the pen line.
[Property][Get/Set] Defined As
[VBA] Long LineColor
[Cicode] INT LineColor
93
IAnalogPen.LineInterpol Gets or sets the drawing style used for drawing the connecting lines between
ation [Property][Get/ points for this analog pen.
Set] Defined As
[VBA] Long LineInterpolation
[Cicode] INT LineInterpolation
[C++] LineType LineInterpolation
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted the return value will be GeneralFailure.
Remarks
The LineInterpolation mode dictates how the two points of a line are joined
when drawn. If Stepped, there will be two lines joining each point, one
horizontal and one vertical. If Straight, only one line is used to directly connect
the two points.
94
IAnalogPen.LineWidth Gets or sets the width in pixels of the pen line when it is drawn.
[Property][Get/Set] Defined As
[VBA] Long LineWidth
[Cicode] INT LineWidth
[C++] int LineWidth
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Limits
Minimum = 0
Maximum = 8
Calling Syntax
This example assumes there is a valid Analog Pen object to be passed into the
example methods.
[VBA]
Sub Example(analogPen As Object)
Dim lineWidth As Long
‘Getting Property value
lineWidth = analogPen.LineWidth
‘Setting Property value
analogPen.LineWidth = 5
End Sub
95
[Cicode]
FUNCTION Example(OBJECT hAnalogPen)
// Getting property value
INT nLineWidth = _ObjectGetProperty(hAnalogPen, "LineWidth");
// Setting property value
_ObjectSetProperty(hAnalogPen, "LineWidth", 5);
END
ICommand Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] ICommand
Methods (0)
Properties (6)
ICommand.CommandId [Property][Get]
ICommand.ButtonType [Property][Get]
ICommand.Enabled [Property][Get/Set]
ICommand.Pressed [Property][Get/Set]
ICommand.Tooltip [Property][Get]
ICommand.Privilege [Property][Get]
[VBA]
Sub Example(Command As Object)
Dim pressed As Boolean
‘Getting Property value
pressed = Command.Pressed
‘Setting Property value
Command.Pressed = True
End Sub
[Cicode]
FUNCTION Example(OBJECT hCommand)
// Getting property value
INT nPressed = _ObjectGetProperty(hCommand, "Pressed");
// Setting property value
_ObjectSetProperty(hCommand, "Pressed", -1);
END
ICommandSystem Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] ICommandSystem
Methods (3)
ICommandSystem.Create [Method]
ICommandSystem.Execute [Method]
ICommandSystem.Remove [Method]
Properties (4)
ICommandSystem.Count [Property][Get]
ICommandSystem.Item [Property][Get]
100
ICommandSystem._NewEnum [Property][Get]
ICommandSystem.ItemById [Property][Get]
[VBA]
Sub Example(CommandSystem As Object)
Dim command As Object
‘Getting Property value
Set command = CommandSystem.Item(1)
End Sub
[Cicode]
FUNCTION Example(OBJECT hCommandSystem)
// Getting property value
OBJECT hCommand = _ObjectCallMethod(hCommandSystem, "get_Item", 1);
END
Calling Syntax
This example assumes there is a valid CommandSystem object as retrieved from
a Process Analyst. (e.g., VBA: ProcessAnalyst.CommandSystem).
[VBA]
Sub Example(CommandSystem As Object)
Dim command As Object
‘Getting Property value
Set command = CommandSystem.ItemById(Citect_Command_AddPen)
End Sub
102
[Cicode]
FUNCTION Example(OBJECT hCommandSystem)
// Getting property value
OBJECT hCommand = _ObjectCallMethod (hCommandSystem," get_ItemById",
Citect_Command_AddPen);
END
ToolbarButtonType_Push = 0
ToolbarButtonType_Toggle = 1
ToolbarButtonType_Separator = 2
tooltip
[in] The text to be displayed as a tooltip for this command (1-64 characters).
iconPath
[in] The path to an icon file that will be used as this command’s picture.
privilege
[in] A privilege value required by the Vijeo Citect user to gain access to this
command (0-8).
Execution Result
If the method succeeds, the return value is Success. If an argument is invalid or
out of range, the return value is InvalidArgument. If the command was not
created, the return value is GeneralFailure.
Remarks
The commandID cannot begin with the prefix “Citect_”.
Calling Syntax
This example assumes there is a valid CommandSystem object as retrieved from
a Process Analyst. (e.g., VBA: ProcessAnalyst.CommandSystem).
103
[VBA]
Sub Example(CommandSystem As Object)
Dim command As Object
Set command = CommandSystem.Create(CommandIO, "Some tooltip text", "c:\someicon.ico",
5)
End Sub
[Cicode]
FUNCTION Example(OBJECT hCommandSystem)
OBJECT hCommand = _ObjectCallMethod(hCommandSystem, "Create", CommandIO, "Some tooltip
text", "c:\someicon.ico", 5);
END
Execution Result
If this method succeeds, the retun value will be Success. If the command is
invalid, the return value will be InvalidArgument.
Remarks
If the current Operator does not have the correct privilege, the command will
not execute.
Calling Syntax
This example assumes there is a valid CommandSystem object as retrieved from
a Process Analyst. (e.g., VBA: ProcessAnalyst.CommandSystem).
[VBA]
Sub Example(CommandSystem As Object)
CommandSystem.Execute(Citect_Command_AddPen)
End Sub
[Cicode]
FUNCTION Example(OBJECT hCommandSystem)
_ObjectCallMethod(hCommandSystem, "Execute", Citect_Command_AddPen);
END
Calling Syntax
This example assumes there is a valid CommandSystem object as retrieved from
a Process Analyst. (e.g., VBA: ProcessAnalyst.CommandSystem).
[VBA]
Sub Example(CommandSystem As Object)
CommandSystem.Remove(“MyCommand1”)
End Sub
[Cicode]
FUNCTION Example(OBJECT hCommandSystem)
_ObjectCallMethod(hCommandSystem, "Remove", “MyCommand1”);
END
ICursors Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] ICursors
Methods
ICursors.Create [Method]
ICursors.RemoveAll [Method]
Properties
ICursors.Item [Property][Get]
ICursors._NewEnum [Property][Get]
ICursors.Count [Property][Get]
ICursors.ItemByName [Property][Get]
position
[in] The initial position of the new cursor. This value is given as the
number of pixels from the left of the Process Analyst graph view.
Execution Result
If the function succeeds, the return value will be Success. If the name is out of
range, the return value will be InvalidArgument. If the name is not unique, the
return value will be InvalidArgument.
If an unexpected error occurs, the return value will be GeneralFailure.
Remarks
The cursor name must be unique. Attempting to create a cursor with a name that
is already in use will result in error and the new cursor will not be created.
Calling Syntax
[VBA]
Sub Example(cursors As Object)
Dim newCursor As Object
newCursor = cursors.Create(“Cursor1”, 100)
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursors)
OBJECT hNewCursor = _ObjectCallMethod(hCursors, “Create”, “Cursor1”, 100);
END
ICursors.Item Retrieves the Cursor from the collection at the specified index.
[Property][Get] Defined As
[VBA] Object Item(index As Integer)
[Cicode] OBJECT get_Item(INT index)
[C++] HRESULT get_Item (long index, ITrendCursor **cursor)
Parameters
index
[in] The index of the required cursor.
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
If the index is out of range, the return value will be InvalidArgument. If the
collection is deleted, the return value will be GeneralFailure.
Remarks
The index for the collection is 1 based. The valid range for this parameter is
between 1 and the total number of cursors.
Calling Syntax
This example assumes you have a valid reference to the cursors collection and
that there are two items in the collection.
[VBA]
Sub Example(hCursors As Object)
Dim hSecondCursor As Object
Set hSecondCursor = hCursors.Item(2)
End Sub
[Cicode]
Sub Example(OBJECT hCursors)
OBJECT hSecondCursor = _ObjectCallMethod(hCursors, "get_Item", 2);
END
Calling Syntax
This example assumes you have a valid reference to the cursors collection and
that there are cursors in the collection.
[VBA]
Sub Example(cursors As Object)
Dim cursor As Object
Dim count As Integer = 0
For Each cursor In cursors
Set count = count + 1
Next
End Sub
Parameters
name
[in] The name of the required cursor.
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the cursor is not
found, the return value will be InvalidArgument.
If the collection is deleted, the return value will be GeneralFailure.
Calling Syntax
This example assumes you have a valid reference to the cursors collection, and
that there is a cursor in the collection named “MyCursor”.
[VBA]
Sub Example(cursors As Object)
Dim cursor As Object
Set cursor = cursors.ItemByName("MyCursor")
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursors)
OBJECT hCursor = _ObjectCallMethod(hCursors, "get_ItemByName", "MyCursor");
END
IDigitalPen Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IDigitalPen
Methods (0)
Properties (4)
IDigitalPen.FillColor [Property][Get/Set]
IDigitalPen.LineColor [Property][Get/Set]
IDigitalPen.LineWidth [Property][Get/Set]
IDigitalPen.Fill [Property][Get/Set]
IDigitalPen.FillColor Gets or Sets the color that will be used to fill the area under the line when the
[Property][Get/Set] value is 1.
Defined As
[VBA] Long FillColor
[Cicode] INT FillColor
[C++] OLE_COLOR FillColor
Execution Result
109
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Remarks
The color value can be calculated using the following formula:
color = (65536 * blue) + (256 * green) + (red)
where red, green, and blue are 0-255. The area under the line is filled with this
color if the value of the Fill property is True (-1).
See Also IDigitalPen.Fill [Property][Get/Set]
Calling Syntax
This example assumes there is a valid DigitalPen object to be passed into the
example methods.
[VBA]
Sub Example(digitalPen As Object)
Dim fillColor As Long
‘Getting Property value
fillColor = digitalPen.FillColor
‘Setting Property to red
digitalPen.FillColor = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hDigitalPen)
// Getting property value
INT nFillColor = _ObjectGetProperty(hDigitalPen, "FillColor");
// Setting property to red
_ObjectSetProperty(hDigitalPen, "FillColor", 255);
END
IDigitalPen.LineColor Gets or Sets the color that will be used to draw the pen line.
[Property][Get/Set] Defined As
[VBA] Long LineColor
[Cicode] INT LineColor
[C++] OLE_COLOR LineColor
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted the return value will be GeneralFailure.
Remarks
The color value can be calculated using the following formula: color = (65536 *
Blue) + (256 * Green) + (Red). Where red, green and blue are 0-255.
Calling Syntax
110
This example assumes there is a valid DigitalPen object to be passed into the
example methods.
[VBA]
Sub Example(digitalPen As Object)
Dim lineColor As Long
‘Getting Property value
lineColor = DigitalPen.LineColor
‘Setting Property to red
digitalPen.LineColor = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hDigitalPen)
// Getting property value
INT nLineColor = _ObjectGetProperty(hDigitalPen, "LineColor");
// Setting property to red
_ObjectSetProperty(hDigitalPen, "LineColor", 255);
END
IDigitalPen.LineWidth Gets or sets the width in pixels of the pen line when it is drawn.
[Property][Get/Set] Defined As
[VBA] Long LineWidth
[Cicode] INT LineWidth
[C++] int LineWidth
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted the return value will be GeneralFailure.
Limits
Minimum = 0
Maximum = 8
Calling Syntax
This example assumes there is a valid Digital Pen object to be passed into the
example methods.
[VBA]
Sub Example(digitalPen As Object)
Dim lineWidth As Long
‘Getting Property value
lineWidth = digitalPen.LineWidth
‘Setting Property value
digitalPen.LineWidth = 5
End Sub
[Cicode]
FUNCTION Example(OBJECT hDigitalPen)
// Getting property value
INT nLineWidth = _ObjectGetProperty(hDigitalPen, "LineWidth");
111
IObjectView Interface
Defined As
[VBA] Object
112
[Cicode] OBJECT
[C++] IObjectView
Methods (0)
Properties (7)
IObjectView.Visible [Property][Get/Set]
IObjectView.Height [Property][Get/Set]
IObjectView.BackgroundColor [Property][Get/Set]
IObjectView.ForeColor [Property][Get/Set]
IObjectView.Columns [Property][Get]
IObjectView.Items [Property][Get]
IObjectView.SelectedItem [Property][Get]
IObjectView.Height Gets or Sets the height in pixels of the Object View window.
[Property][Get/Set] Defined As
[VBA] Long Height
[Cicode] INT Height
[C++] int Height
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. A height value less
than 0 will be InvalidArgument.
Limits
Height must be 0 or greater.
Remarks
As the ObjectView and chart both share the same window, by enlarging the
ObjectView, you make the Chart smaller and vice versa.
Calling Syntax
This example assumes that there is an IObjectView object being passed in as a
parameter.
[VBA]
Sub Example(objectView As Object)
Dim height As Long
‘Getting Property value
height = objectView.Height
‘Setting Property value
objectView.Height = 25
End Sub
[Cicode]
FUNCTION Example(OBJECT hObjectView)
INT nHeight = 0;
// Getting property value
nHeight = _ObjectGetProperty(hObjectView, "Height");
// Setting Property to false
_ObjectSetProperty(hObjectView, "Height", 25);
END
IObjectView.Backgroun Gets or Sets the background color of the ObjectView. This number is treated as
dColor [Property][Get/ an OLE_COLOR inside the Process Analyst.
Set] Defined As
[VBA] Long BackgroundColor
[Cicode] INT BackgroundColor
114
IObjectView.ForeColor Gets or Sets the Fore color (text and color box outlines) of the ObjectView. This
[Property][Get/Set] number is treated as an OLE_COLOR inside the Process Analyst.
Defined As
[VBA] Long ForeColor
[Cicode] INT ForeColor
[C++] OLE_COLOR ForeColor
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Remarks
The color value can be calculated using the following formula: color = (65536 *
Blue) + (256 * Green) + (Red). Where red, green and blue are 0-255.
Calling Syntax
This example assumes that there is an IObjectView object being passed in as a
parameter.
115
[VBA]
Sub Example(objectView As Object)
Dim foreColor As Long
‘Getting Property value
foreColor = objectView.ForeColor
‘Setting Property value to red
objectView.ForeColor = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hObjectView)
INT nForeColor = 0;
// Getting property value
nForeColor = _ObjectGetProperty(hObjectView, "ForeColor");
// Setting Property to red
_ObjectSetProperty(hObjectView, "ForeColor", 255);
END
IObjectView.Columns Gets the automation object representing the collection of columns currently
[Property][Get] visible in the ObjectView.
Defined As
[VBA] Object Columns
[Cicode] OBJECT Columns
[C++] IObjectViewColumns* Columns
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Calling Syntax
This example assumes that there is an IObjectView object being passed in as a
parameter.
[VBA]
Sub Example(objectView As Object)
Dim columns As Object
‘Getting Property value
Set columns = objectView.Columns
End Sub
[Cicode]
FUNCTION Example(OBJECT hObjectView)
// Getting property value
OBJECT hColumns = _ObjectGetProperty(hObjectView, "Columns");
END
IObjectView.Items Gets the automation object representing the collection of items at the root of the
[Property][Get] ObjectView tree.
Defined As
[VBA] Object Items
116
IObjectView.SelectedIte Gets the current primary selection in the ObjectView. This is the pen item that
m [Property][Get] was last selected.
Defined As
[VBA] Object SelectedItem
[Cicode] OBJECT SelectedItem
[C++] IObjectViewItem* SelectedItem
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Calling Syntax
This example assumes that there is an IObjectView object being passed in as a
parameter.
[VBA]
Sub Example(objectView As Object)
Dim selectedItem As Object
‘Getting Property value
Set selectedItem = objectView.SelectedItem
End Sub
117
[Cicode]
FUNCTION Example(OBJECT hObjectView)
// Getting property value
OBJECT hSelectedItem = _ObjectGetProperty(hObjectView, "SelectedItem");
END
IObjectViewColumn Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IObjectViewColumn
Methods (0)
Properties (3)
IObjectViewColumn.Name [Property][Get]
IObjectViewColumn.Text [Property][Get]
IObjectViewColumn.Width [Property][Get/Set]
IObjectViewColumn.Tex Gets the Text that is being displayed for this columns header.
t [Property][Get] Defined As
118
IObjectViewColumns Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IObjectViewColumns
Methods (4)
IObjectViewColumns.Add [Method]
IObjectViewColumns.Hide [Method]
IObjectViewColumns.Remove [Method]
IObjectViewColumns.Show [Method]
Properties (4)
IObjectViewColumns.Count [Property][Get]
IObjectViewColumns.Item [Property][Get]
IObjectViewColumns.ItemByName [Property][Get]
IObjectViewColumns._NewEnum [Property][Get]
Execution Result
If the method succeeds, the return value will be Success. If an argument is out of
range, the return value will be InvalidArgument. If the column cannot be added,
the return value is GeneralFailure.
120
Calling Syntax
This example assumes there is a valid Columns collection as retrieved from an
ObjectView. (e.g., VBA: objectView.Columns).
[VBA]
Sub Example(Columns As Object)
Columns.Add "NameID", "New Column", 120;
End Sub
[Cicode]
FUNCTION Example(OBJECT hColumns)
_ObjectCallMethod(hColumns, "Add", "NameID", "New Column", 120);
END
IObjectViewColumns.Hi Makes the specified column hidden within the Object View.
de [Method] Defined As
[VBA] Hide(columnName As String)
[Cicode] Hide(STRING columnName)
[C++] HRESULT Hide(BSTR columnName)
Parameters
columnName
[in] The string ID uniquely identifying the column you want to hide
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the field cannot be
set, GeneralFailure is returned.
See Also IObjectViewColumns.Show [Method]
Calling Syntax
This example assumes there is a columns Collection from an ObjectView. (e.g.,
VBA: objectView.Columns).
[VBA]
Sub Example(columns As Object)
columns.Hide "Error"
End Sub
[Cicode]
FUNCTION Example(OBJECT hColumns)
_ObjectCallMethod(hColumns, "Hide", "Error");
END
IObjectViewColumns.Re Removes the specified custom column from the Object View columns.
move [Method] Defined As
[VBA] Remove(columnName As String)
121
IObjectViewColumns.Sh Makes the specified column visible within the Object View.
ow [Method] Defined As
[VBA] Show(columnName As String)
[Cicode] Show(STRING columnName)
[C++] HRESULT Show(BSTR columnName)
Parameters
columnName
[in] The string ID uniquely identifying the column you want to make
visible
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the field cannot be
set, then GeneralFailure is returned.
See Also IObjectViewColumns.Hide [Method]
Calling Syntax
122
[in] Indicates the index location of the column to return from this
collection. (One based)
Calling Syntax
This example assumes there is a valid Columns collection as retrieved from an
ObjectView (e.g., VBA: objectView.Columns).
[VBA]
Sub Example(Columns As Object)
Dim column As Object
‘Getting Property value
Set column = Columns.Item(1)
End Sub
[Cicode]
FUNCTION Example(OBJECT hColumns)
// Getting property value
OBJECT hColumn = _ObjectCallMethod(hColumns, "get_Item", 1);
END
IObjectViewColumns.Ite Returns a reference to the column object with the given name from this column’s
mByName collection.
[Property][Get] Defined As
[VBA] ItemByName(columnName As String) as Object
[Cicode] OBJECT ItemByName(STRING columnName)
[C++] ItemByName(STRING columnName, IObjectViewColumn* Item)
Parameters
columnName
[in] Indicates the unique name of the column item to return from this
collection.
Execution Results
If the method succeeds, the return value will be Success. If the column cannot be
found, the return value will be InvalidArgument.
Calling Syntax
This example assumes there is a valid Columns collection object to be passed
into the example methods.
[VBA]
Sub Example(columns As Object)
Dim column As Object
‘Getting Property value
Set column = columns.ItemByName(“Duration”)
End Sub
124
[Cicode]
FUNCTION Example(OBJECT hColumns)
// Getting property value
OBJECT hColumn = _ObjectCallMethod(hColumns, "get_ItemByName", "Duration");
END
IObjectViewItem Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IObjectViewItem
Methods (2)
IObjectViewItem.GetField [Method]
IObjectViewItem.PutField [Method]
Properties (3)
IObjectViewItem.Expanded [Property][Get/Set]
IObjectViewItem.Tag [Property][Get/Set]
IObjectViewItem.Items [Property][Get]
IObjectViewItem.GetFiel Returns the string value of a displayed field for a specified column on this item.
d [Method] The IObjectViewItem interface is hierarchical to two levels – pane and then pen.
The result of the GetField method will depend on what type of item it is called
on. To access the fields for a pen, for example, you have to first get the items
collection for the pane item, then get the pen item.
Defined As
[VBA] GetField(ColumnName As String) as String
[Cicode] STRING GetField (STRING ColumnName)
[C++] HRESULT GetField (BSTR ColumnName, BSTR *Val)
125
Parameters
ColumnName
[in] The string ID uniquely identifying the column whose field value is
being queried for.
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the ColumnName
does not exist, InvalidArgument will be returned.
Calling Syntax
This example gets the Scale property of the first pen in the first pane. It assumes
there is a valid Item as retrieved from an Items Collection from an ObjectView.
(e.g., VBA: objectView.Items.Item(1))
[VBA]
Sub Example()
Dim paneItem As Object
Dim penItem As Object
Dim fieldValue As String
Set paneItem = Test_CPA.ObjectView.Items.Item(1) 'Get the first pane of the ObjectView
Set penItem = paneItem.Items.Item(1) 'Get the first pen from the first pane
penItem.GetField "Scale", fieldValue 'Get the value of the scale field
End Sub
[CICODE]
FUNCTION Example(OBJECT hObjectView)
OBJECT hPaneItems = _ObjectGetProperty(hObjectView, "Items");
OBJECT hPaneItem = _ObjectCallMethod(hPaneItems, "get_Item", 1); // Get the first pane
of the ObjectView
OBJECT hPenItems = _ObjectGetProperty(hPaneItem, "Items"); // Get the collection of
pens from the first pane
OBJECT hPenItem = _ObjectCallMethod(hPenItems, "get_Item", 1); // Get the first Pen
item
STRING sValue;
_ObjectCallMethod(hPenItem, "GetField", "Scale", sValue); // Get the value of the scale
field
END
IObjectViewItem.PutFiel Sets the display string in a field’s cell for a specified column on this item.
d [Method] The IObjectViewItem interface is hierarchical to two levels – pane and then pen.
The scope of the PutField method will depend on what type of item it is called
on. To set fields for a pen, for example, you have to first get the items collection
for the pane item, then get the pen item.
Defined As
[VBA] PutField(columnName As String, fieldValue as String)
[Cicode] PutField (STRING columnName, STRING fieldValue)
[C++] HRESULT PutField (BSTR columnName, BSTR fieldValue)
Parameters
126
columnName
[in] The string ID uniquely identifying the column whose field value is
being set.
fieldValue
[in] The string you would like to be displayed in the field for this column/
pen intersection.
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the field cannot be
set, then GeneralFailure is returned.
Calling Syntax
This example writes the value “someValue” to the CustomColumn field of the
first pen in the first pane. It assumes there is a valid Item as retrieved from an
Items Collection from an ObjectView. (e.g., VBA: objectView.Items.Item(1)).
[VBA]
Sub Example()
Dim paneItem As Object
Dim penItem As Object
Set paneItem = Test_CPA.ObjectView.Items.Item(1) 'Get the first pane of the ObjectView
Set penItem = paneItem.Items.Item(1) 'Get the first pen from the first pane
penItem.PutField "CustomColumn", "someValue" 'Set the value of the CustomColumn field
End Sub
[CICODE]
FUNCTION Example(OBJECT hObjectView)
OBJECT hPaneItems = _ObjectGetProperty(hObjectView, "Items");
OBJECT hPaneItem = _ObjectCallMethod(hPaneItems, "get_Item", 1); // Get the first pane
of the ObjectView
OBJECT hPenItems = _ObjectGetProperty(hPaneItem, "Items"); // Get the collection of
pens from the first pane
OBJECT hPenItem = _ObjectCallMethod(hPenItems, "get_Item", 1); // Get the first Pen
item
_ObjectCallMethod(hPenItem, "PutField", "CustomColumn", "someValue"); // Set the value
of the CustomColumn field
END
IObjectViewItem.Expan Gets or Sets the expanded state of an item in the ObjectView. This change is
ded [Property][Get/Set] reflected immediately in the visualization of the ObjectView.
Defined As
[VBA] Boolean Expanded
[Cicode] INT Expanded
[C++] VARIANT_BOOL Expanded
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Limits
127
IObjectViewItem.Tag Gets or Sets a user specified piece of data to associate with this Item.
[Property][Get/Set] Defined As
[VBA] <Any Type> Tag
[Cicode] <Any Type> Tag
[C++] VARIANT Tag
Remarks
The user can associate any variant of data with a pen. This is handy for
associating some custom data with a pen item, and then having direct access to it
whenever any events with a pen item target occur.
Calling Syntax
This example assumes there is a valid Item as retrieved from an Items Collection
from an ObjectView. (e.g., VBA: objectView.Items.Item(1)).
[VBA]
Sub Example(objectViewItem As Object)
Dim tag As Variant
‘Getting Property value
tag = objectViewItem.Tag
‘Setting Property value to red
objectViewItem.Tag = tag
End Sub
[Cicode]
FUNCTION Example(OBJECT hObjectViewItem)
// Getting property value
INT nTag = _ObjectGetProperty(hObjectViewItem, "Tag");
128
IObjectViewItem.Items Gets the automation object representing the collection of child items under this
[Property][Get] item.
Defined As
[VBA] Object Items
[Cicode] OBJECT Items
[C++] IObjectViewItems* Items
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Remarks
Pane nodes are currently the only nodes that can have children.
Calling Syntax
This example assumes there is a valid item as retrieved from an ObjectView.
(e.g., VBA: objectView.Items.Item(1). This will be a pane).
[VBA]
Sub Example(objectViewItem As Object)
Dim items As Object
‘Getting Property value
Set items = objectViewItem.Items
End Sub
[Cicode]
FUNCTION Example(OBJECT hObjectViewItem)
// Getting property value
OBJECT hItems = _ObjectGetProperty(hObjectViewItem, "Items");
END
IObjectViewItems Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IObjectViewItems
Methods (0)
Properties (3)
IObjectViewItems.Count [Property][Get]
IObjectViewItems.Item [Property][Get]
IObjectViewItems._NewEnum [Property][Get]
129
[Cicode]
FUNCTION Example(OBJECT hItems)
// Getting property value
OBJECT hItem = _ObjectCallMethod(hItems, "get_Item", 1);
END
IObjectViewPenItem Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IObjectViewPenItem
Methods (0)
Properties (3)
IObjectViewPenItem.BlockColor [Property][Get])
IObjectViewPenItem.Checked [Property][Get/Set]
IObjectViewPenItem.Selected [Property][Get]
Calling Syntax
This example assumes there is a valid pen item as retrieved from an ObjectView.
(e.g., VBA: ObjectView.Items.Item(1).Items.Item(1) This will be a pen).
[VBA]
Sub Example(objectViewPenItem As Object)
Dim blockColor As Long
‘Getting Property value
blockColor = objectViewPenItem.BlockColor
End Sub
[Cicode]
FUNCTION Example(OBJECT hObjectViewPenItem)
// Getting property value
INT blockColor = _ObjectGetProperty(hObjectViewItem, "BlockColor");
END
Calling Syntax
This example assumes there is a valid pen item as retrieved from an ObjectView.
(e.g., VBA: objectView.Items.Item(1).Items.Item(1) This will be a pen).
[VBA]
Sub Example(objectViewPenItem As Object)
Dim checked As Boolean
‘Getting Property value
checked = objectViewPenItem.Checked
‘Setting Property value
objectViewPenItem.Checked = False
End Sub
132
[Cicode]
FUNCTION Example(OBJECT hObjectViewPenItem)
// Getting property value
INT checked = _ObjectGetProperty(hObjectViewItem, "Checked");
// Setting property value
_ObjectSetProperty(hObjectViewItem, "Checked", 0);
END
IObjectViewPenItem.Sel Gets whether or not this pen is the selected pen in its pane.
ected [Property][Get] Defined As
[VBA] Boolean Selected
[Cicode] INT Selected
[C++] VARIANT_BOOL Selected
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Limits
True (-1): Selected
False (0): Unselected
Remarks
Each Pane has one selected pen. It is visually emphasized by a vertical gradient
fill.
Calling Syntax
This example assumes there is a valid pen item as retrieved from an ObjectView.
(e.g., VBA: objectView.Items.Item(1).Items.Item(1) This will be a pen).
[VBA]
Sub Example(objectViewPenItem As Object)
Dim selected As Boolean
‘Getting Property value
selected = objectViewPenItem.Selected
End Sub
[Cicode]
FUNCTION Example(OBJECT hObjectViewPenItem)
// Getting property value
INT selected = _ObjectGetProperty(hObjectViewItem, "Selected");
END
IPane Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IPanes
133
Methods (1)
IPane.Delete [Method]
Properties (6)
IPane.Height [Property][Get/Set]
IPane.Collection [Property][Get]
IPane.Name [Property][Get/Set]
IPane.BackgroundColor [Property][Get/Set]
IPane.FixedHeight [Property][Get/Set]
IPane.Pens [Property][Get]
IPane.Delete [Method] Removes this Pane from the collection and the display.
Defined As
[VBA] Delete()
[Cicode] Delete()
[C++] HRESULT Delete()
Execution Result
If the method succeeds, the return value will be Success. If the pane is already
deleted, the return value will be GeneralFailure.
Remarks
Any pen associated with the pane will also be deleted.
Calling Syntax
This example assumes there is a valid Pane object to be passed into the example
methods.
[VBA]
Sub Panes(Pane As Object)
Pane.Delete()
End Sub
[Cicode]
FUNCTION Example(OBJECT hPane)
_ObjectCallMethod(hPane, “Delete”);
END
Remarks
This property affects the visible height of the Pane in two different ways based
on the Boolean value of the FixedHeight property. If the FixedHeight property is
True, the Pane takes on a pixel height equivalent to the Height property value.
All pens inside the Pane are adjusted to fit. If the FixedHeight property is False,
the Height property value is used as a ratio of the available ‘Variable’ real estate
(all the left over room in the Process Analyst after Fixed Height panes have been
added) which is shared out between all the Variable Height panes.
See Also IPane.FixedHeight [Property][Get/Set]
Calling Syntax
This example assumes there is a valid Pane object to be passed into the example
methods.
[VBA]
Sub Example(Pane As Object)
Dim height As Long
‘Getting Property value
height = Pane.Height
‘Setting Property value
Pane.Height = 250
End Sub
[Cicode]
FUNCTION Example(OBJECT hPane)
// Getting property value
INT nHeight = _ObjectGetProperty(hPane, "Height");
// Setting property value
_ObjectSetProperty(hPane, "Height", 250);
END
IPane.Collection Returns a reference to the Panes collection that this Pane belongs to.
[Property][Get] Defined As
[VBA] Object Collection
[Cicode] OBJECT Collection
[C++] IPanes* Collection
Execution Result
If the property get succeeds the return value will be Success. If the pane is
deleted the return value will be GeneralFailure.
See Also IPanes Interface
Calling Syntax
This example assumes there is a valid Pane object to be passed into the example
methods.
135
[VBA]
Sub Example(pane As Object)
Dim panes As Object
‘Getting Property value
Set panes = pane.Collection
End Sub
[Cicode]
FUNCTION Example(OBJECT hPane)
// Getting property value
OBJECT hPanes = _ObjectGetProperty(hPane, "Collection");
END
Remarks
When this property is true, the pane’s Height reflects the pixel value size as
gotten from the Pane’s Height property. If the FixedHeight property is false, the
Height property value is used as a ratio of the available ‘Variable’ real estate (all
the left over room in the Process Analyst after Fixed Height panes have been
added) which is shared out between all the Variable Height panes.
See Also IPane.Height [Property][Get/Set]
Calling Syntax
This example assumes there is a valid Pane object to be passed into the example
methods.
[VBA]
Sub Example(pane As Object)
Dim fixedHeight As Boolean
‘Getting Property value
fixedHeight = pane.FixedHeight
‘Setting Property value
pane.FixedHeight = True
End Sub
[Cicode]
FUNCTION Example(OBJECT hPane)
// Getting property value
INT bFixedHeight = _ObjectGetProperty(hPane, "FixedHeight");
// Setting property value
_ObjectSetProperty(hPane, "FixedHeight", -1);
END
IPane.Pens Gets a reference to the pens collection object containing the pens for this pane.
[Property][Get] Defined As
[VBA] Object Pens
[Cicode] OBJECT Pens
[C++] IPens* Pens
Execution Result
If the property get succeeds the return value will be Success. If the pane is
deleted the return value will be GeneralFailure.
See Also IPens Interface
Calling Syntax
This example assumes there is a valid Pane object to be passed into the example
methods.
138
[VBA]
Sub Example(pane As Object)
Dim pens As Object
‘Getting Property value
Set pens = pane.Pens
End Sub
[Cicode]
FUNCTION Example(OBJECT hPane)
// Getting property value
OBJECT hPens = _ObjectGetProperty(hPane, "Pens");
END
IPanes Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IPanes
Methods (2)
IPanes.Create [Method]
IPanes.RemoveAll [Method]
Properties (4)
IPanes.Count [Property][Get]
IPanes.Item [Property][Get]
IPanes._NewEnum [Property][Get]
IPanes.ItemByName [Property][Get]
IPanes.Create [Method] Adds a pane to this collection and returns a reference to it.
Defined As
[VBA] Create(name as String) as Object
[Cicode] OBJECT Create (STRING name)
[C++] HRESULT Create(BSTR name, IPane** pane)
Parameters
name
[in] The name to give to the pane (0-250 characters).
Execution Result
If the method succeeds, the return value will be Success. If a pane of the same
name exists, the return value will be InvalidArgument. If the panes collection is
deleted, the return value will be GeneralFailure.
Remarks
When this method succeeds it will return a reference to the new IPane object.
See Also IPanes Interface
139
Calling Syntax
This example assumes there is a valid Panes collection object to be passed into
the example methods.
[VBA]
Sub Example(Panes As Object)
Dim pane As Object
Set pane = Panes.Create(“Alarm Pane”)
End Sub
[Cicode]
FUNCTION Example(OBJECT hPanes)
OBJECT hPane = _ObjectCallMethod(hPanes, “Create”, “Alarm Pane”);
END
Calling Syntax
This example assumes there is a valid Panes collection object to be passed into
the example methods.
[VBA]
Sub Example(Panes As Object)
Dim count As Long
‘Getting Property value
count = Panes.Count
End Sub
[Cicode]
FUNCTION Example(OBJECT hPanes)
// Getting property value
INT nCount = _ObjectGetProperty(hPanes, "Count");
END
IPanes.Item Gets the Pane at the given index in this Pane collection.
[Property][Get] Defined As
[VBA] Item(index As Long) as Object
[Cicode] OBJECT Item(INT index)
[C++] Item(int index, IPane* Item)
Parameters
index
[in] Indicates the location of the Pane item to return from this collection.
(One based)
Execution Result
If the property get succeeds the return value will be Success. If the index is out of
range then the return value will be InvalidArgument. If the panes collection is
deleted the return value will be GeneralFailure.
See Also IPane Interface
Calling Syntax
This example assumes there is a valid Panes collection object to be passed into
the example methods.
[VBA]
Sub Example(Panes As Object)
Dim pane As Object
‘Getting Property value
Set pane = Panes.Item(1)
End Sub
[Cicode]
FUNCTION Example(OBJECT hPanes)
// Getting property value
OBJECT hPane = _ObjectCallMethod(hPanes, "get_Item", 1);
END
141
IPanes.ItemByName Returns a reference to the pane object with the given name from this Panes
[Property][Get] collection.
Defined As
[VBA] ByName(name As String) as Object
[Cicode] OBJECT ByName(STRING name)
[C++] ByName(STRING name, IPane* Item)
Parameters
name
[in] Indicates the name of the Pane item to return from this collection.
Execution Result
If the property get succeeds, the return value will be Success. If the pane cannot
be found, the return value will be InvalidArgument. If the panes collection is
deleted, the return value will be GeneralFailure.
Calling Syntax
This example assumes there is a valid Panes collection object to be passed into
the example methods.
[VBA]
Sub Example(Panes As Object)
Dim pane As Object
‘Getting Property value
Set pane = Panes.ItemByName(“Alarm Pane”)
End Sub
[Cicode]
FUNCTION Example(OBJECT hPanes)
// Getting property value
OBJECT hPane = _ObjectCallMethod(hPanes, "get_ItemByName", "Alarm Pane");
END
142
IPen Interface
Methods
IPen.AddSample
IPen.Clear [Method]
IPen.Delete [Method]
IPen.GetDefaultSpan [Method]
IPen.GetHorizontalAxisTimeSpan [Method]
IPen.GetInformation [Method]
IPen.GetStatistic [Method]
IPen.GetVerticalAxisSpan [Method]
IPen.GoToNow [Method]
IPen.HorizontalScrollBy [Method]
IPen.HorizontalZoom [Method]
IPen.PutHorizontalAxisTimeSpan [Method]
IPen.PutVerticalAxisSpan [Method]
IPen.RefreshData [Method]
IPen.ResetToDefaultSpan [Method]
IPen.Select [Method]
IPen.SetDefaultSpan [Method]
IPen.SetQualityCompactionPointType [Method]
IPen.SetQualityLineStyle [Method]
IPen.SetVerticalAxisLabelValue [Method]
IPen.VerticalScrollBy [Method]
IPen.VerticalZoom [Method]
Properties
IPen.AxisBackgroundColor [Property][Get/Set]
IPen.BlockRepaint [Property][Get/Set]
IPen.Collection [Property][Get]
IPen.DataPoint [Property][Get/Set]
IPen.DataServer [Property][Get/Set]
IPen.Height [Property][Get/Set]
IPen.HorizontalAxisColor [Property][Get/Set]
IPen.HorizontalAxisResize [Property][Get/Set]
IPen.HorizontalAxisScroll [Property][Get/Set]
IPen.HorizontalAxisWidth [Property][Get/Set]
IPen.HorizontalGridlinesColor [Property][Get/Set]
IPen.HorizontalGridlinesStyle [Property][Get/Set]
IPen.HorizontalGridlinesWidth [Property][Get/Set]
IPen.HorizontalMinorGridlinesColor [Property][Get/Set]
IPen.HorizontalMinorGridlinesStyle [Property][Get/Set]
IPen.IsDeleted [Property][Get]
IPen.IsSelected [Property][Get]
IPen.LocalTime [Property][Get/Set]
IPen.Name [Property][Get/Set]
IPen.PointsVisible [Property][Get/Set]
IPen.RequestMode [Property][Get/Set]
IPen.Stacked [Property][Get/Set]
IPen.TrendCursorLabelFillColor [Property][Get/Set]
IPen.TrendCursorLabelLineColor [Property][Get/Set]
IPen.TrendCursorLabelTextColor [Property][Get/Set]
IPen.VerticalAxisAutoscale [Property][Get/Set]
IPen.VerticalAxisColor [Property][Get/Set]
IPen.VerticalAxisLabelType [Property][Get/Set]
143
IPen.VerticalAxisResize [Property][Get/Set]
IPen.VerticalAxisScroll [Property][Get/Set]
IPen.VerticalAxisWidth [Property][Get/Set]
IPen.VerticalGridlinesColor [Property][Get/Set]
IPen.VerticalGridlinesStyle [Property][Get/Set]
IPen.VerticalGridlinesWidth [Property][Get/Set]
IPen.VerticalMinorGridlinesColor [Property][Get/Set]
IPen.VerticalMinorGridlinesStyle [Property][Get/Set]
IPen.Visible [Property][Get/Set]
Execution Result
If the function succeeds, the return value will be Success. If an argument is bad,
the return value will be InvalidArgument. If an argument is out of range, the
return value will be InvalidArgument. If the pen is deleted, the return value will
be GeneralFailure. If any other unexpected error occurs, the return value will be
GeneralFailure.
Remarks
This function has limited use as the samples added are stored in a temporary
cache; they can be cleared anytime by time span changes, data refresh calls, or
automation.
You can only add samples to analog or digital pens.
See Also QualityType [Enumeration], QualityCompactionType [Enumeration]
Calling Syntax
144
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim timeStamp As Date
timestamp = Now
pen.AddSample 75.0, timeStamp, 100, 0, 0
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT iCitectTime;
REAL rOleTime;
IPen.Clear [Method] Clears all samples belonging to this pen from the internal cache. (Note: This does
not remove logged samples from the server)
Defined As
[VBA] Clear()
[Cicode] Clear()
[C++] HRESULT Clear()
Execution Result
If the function succeeds the return value will be Success. If the pen is deleted
then the return value will be GeneralFailure.
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
pen.Clear
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
_ObjectCallMethod(hPen, “Clear”);
END
If the function succeeds, the return value will be Success. If the pen is already
deleted, the return value will be GeneralFailure.
Remarks
Calling this method will mark the pen for deletion, meaning any further calls to
methods or properties on the pen will result in a GeneralFailure error. The pen
will be removed from the display immediately after making this call.
See Also IPen.IsDeleted [Property][Get]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
pen.Delete
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
_ObjectCallMethod(hPen, “Delete”);
END
IPen.GetDefaultSpan Returns the default time span for this pen as a series of time components.
[Method] Defined As
[VBA] GetDefaultSpan(weeks As Integer, days As Integer, hours As Integer,
minutes As Integer, seconds As Integer, milliseconds As Integer)
[Cicode] GetDefaultSpan (INT weeks, INT days, DATE hours, INT minutes,
INT seconds, INT milliseconds)
[C++] HRESULT GetDefaultSpan (short* weeks, short* days, short* hours,
short* minutes, short* seconds, short* milliseconds)
Parameters
weeks
[out] Indicates the number of weeks in the span.
days
[out] Indicates the number of days in the span.
hours
[out] Indicates the number of hours in the span.
minutes
[out] Indicates the number of minutes in the span.
seconds
[out] Indicates the number of seconds in the span.
milliseconds
[out] Indicates the number of milliseconds in the span.
Execution Result
146
If the function succeeds, the return value will be Success. If an argument is bad,
the return value will be InvalidArgument. If the pen is deleted, the return value
will be GeneralFailure. If any other unexpected error occurs, the return value
will be GeneralFailure.
See Also IPen.SetDefaultSpan [Method], IPen.ResetToDefaultSpan [Method]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim weeks As Integer
Dim days As Integer
Dim hours As Integer
Dim minutes As Integer
Dim seconds As Integer
Dim milliseconds As Integer
pen.GetDefaultSpan weeks, days, hours, minutes, seconds,
milliseconds
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT weeks;
INT days;
INT hours;
INT minutes;
INT seconds;
INT milliseconds;
_ObjectCallMethod(hPen, “GetDefaultSpan”, weeks, days, hours, minutes, seconds,
milliseconds);
END
IPen.GetHorizontalAxis Returns the start and end time of this pen in local or UTC time format.
TimeSpan [Method] Defined As
[VBA] GetHorizontalAxisTimeSpan(startTime As Date, startMs as Integer,
endTime as Date, endMs as Integer, localTime as Boolean)
[Cicode] GetHorizontalAxisTimeSpan (REAL startTime, INT startMs, REAL
endTime, INT endMs, INT localTime)
[C++] HRESULT GetHorizontalAxisTimeSpan (DATE* startTime, short*
startMs, DATE* endTime, short* endMs, VARIANT_BOOL localTime)
Parameters
startTime
[out] This will contain the beginning date and time without milliseconds of
the time span.
startMs
[out] This will contain the milliseconds component of the start time.
endTime
147
[out] This will contain the end date and time without milliseconds.of the
time span.
endMs
[out] This will contain the milliseconds component of the end time.
localTime
[in] Indicates whether the times returned are in local time or UTC. True = -
1, False (0) = UTC.
Execution Result
If the function succeeds, the return value will be Success. If an argument is bad,
the return value will be InvalidArgument. If the pen is deleted, the return value
will be GeneralFailure. If any other unexpected error occurs, the return value
will be GeneralFailure.
See Also IPen.PutHorizontalAxisTimeSpan [Method]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim startDate As Date
Dim endDate As Date
Dim startMs As Integer
Dim endMs As Integer
pen.GetHorizontalAxisTimeSpan startDate, startMs, endDate,
endMs, True
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
REAL startDate;
REAL endDate;
INT startMs;
INT endMs;
_ObjectCallMethod(hPen, “GetHorizontalAxisTimeSpan”, startDate, startMs, endDate,
endMs, -1);
END
value
[out] Indicates the value of the specified information attribute.
Execution Result
If the function succeeds, the return value will be Success. If an argument is bad,
the return value will be InvalidArgument. If the attribute does not exist, the
return value will be InvalidArgument. If the pen is deleted, the return value will
be GeneralFailure. If any other unexpected error occurs, the return value will be
GeneralFailure.
Information Attributes
Attribute Returns Applies to
Alarm Area Alarm tag field Alarm
Alarm Category Alarm tag field Alarm
Alarm Desc Alarm tag field Alarm
Alarm Name Alarm tag field Alarm
Alarm Type Alarm tag field Alarm
Comment Alarm/Trend tag comment field All
Duration Process Analyst time span All
End Time Process Analyst axis end time All
Engineering Full Scale Trend tag field Analog, Digital
Engineering Units Trend tag field Analog, Digital
Engineering Zero Scale Trend tag field Analog, Digital
Error Process Analyst error status All
Full Scale Process Analyst vertical axis max scale Analog,
Name Process Analyst pen name All
Raw Full Scale Trend tag field Analog, Digital
Raw Zero Scale Trend tag field Analog, Digital
Sample Period Trend tag field Analog, Digital
Start Time Process Analyst axis start time All
Tag Process Analyst source binding field All
Trend Type Trend tag field Analog, Digital
Zero Scale Process Analyst vertical axis min scale Analog
Scale Process Analyst vertical axis scale range Analog, Digital
Engineering Scale Engineering scale range Analog, Digita
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim duration As String
duration = pen.GetInformation "Duration"
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
STRING duration;
duration = _ObjectCallMethod(hPen, "GetInformation", "Duration");
END
149
Execution Result
If the function succeeds, the return value will be Success. If an argument is bad,
the return value will be InvalidArgument. If the attribute does not exist, the
return value will be InvalidArgument. If the pen is deleted, the return value will
be GeneralFailure. If any other unexpected error occurs, the return value will be
GeneralFailure.
Information Attributes
Attribute Returns Applies to
Average Process Analyst real-time average Analog, Digital
Maximum Process Analyst real-time maximum Analog
Minimum Process Analyst real-time minimum Analog
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim average As String
pen.GetStatistic “Average”, average
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
STRING average;
_ObjectCallMethod(hPen, “GetStastic”, “Average”, average);
END
Parameters
startValue
[out] The current lower bound of the vertical axis.
endValue
[out] The current upper bound of the vertical axis.
Execution Result
If the function succeeds, the return value will be Success. If an argument is bad,
the return value will be InvalidArgument. If the pen is deleted, the return value
will be GeneralFailure. If any other unexpected error occurs, the return value
will be GeneralFailure.
See Also IPen.PutVerticalAxisSpan [Method]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim startValue As Double
Dim endValue As Double
pen.GetVerticalAxisSpan startValue, endValue
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
REAL startValue;
REAL endValue;
_ObjectCallMethod(hPen, “GetVerticalAxisSpan”, startValue, endValue);
END
IPen.GoToNow Synchronizes the end time of the pen’s span with your computer’s current local
[Method] time. The start time will also be moved to maintain the pen’s current time span.
Defined As
[VBA] GoToNow()
[Cicode] GoToNow()
[C++] HRESULT GoToNow()
Execution Result
If the function succeeds, the return value will be Success. If the pen is deleted,
the return value will be GeneralFailure.
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
pen.GoToNow
End Sub
151
[Cicode]
FUNCTION Example(OBJECT hPen)
_ObjectCallMethod(hPen, “GoToNow”);
END
IPen.HorizontalZoom Zooms centrally into the time span by the given factor.
[Method] Defined As
[VBA] HorizontalZoom(factor As Double)
[Cicode] HorizontalZoom(REAL factor)
[C++] HRESULT HorizontalZoom(double factor)
Parameters
factor
152
[in] Controls the direction and amount the axis will be zoomed. Acceptable
zoom values are 0 to 1 (Zoom out) and > 1 (zoom in).
Execution Result
If the function succeeds the return value will be Success. If the argument is bad
then the return value will be InvalidArgument. If the argument is out of range
then the return value will be InvalidArgument. If the pen is deleted then the
return value will be GeneralFailure.
See Also IPen.VerticalZoom [Method]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
‘ Zoom out 50%
pen.HorizontalZoom 0.5
‘ Undo the Zoom
pen.HorizontalZoom 1.5
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
// Zoom out 50%
_ObjectCallMethod(hPen, “HorizontalZoom”, 0.5);
// Undo the Zoom
_ObjectCallMethod(hPen, “HorizontalZoom”, 2.0);
END
IPen.PointsVisible Gets or Sets whether the sample points are displayed or hidden on the pen.
[Property][Get/Set] Defined As
[VBA] Boolean PointsVisible
[Cicode] INT PointsVisible
[C++] VARIANT_BOOL PointsVisible
Execution Results
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Limits
True(-1): Points are visible
False(0): Points are hidden
Remarks
By default this property is False, meaning that any point type you have set using
the SetQualityCompactionPointType function will be hidden.
See Also IPen.SetQualityCompactionPointType [Method]
Calling Syntax
153
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim visible As Boolean
‘Getting Property value
visible = pen.PointsVisible
‘Setting Property value
pen.PointsVisible = True
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT visible;
// Getting current property value
visible = _ObjectGetProperty(hPen, "PointsVisible");
// Setting Property value
_ObjectSetProperty(hPen, "PointsVisible", -1);
END
Execution Result
If the function succeeds the return value will be Success. If an argument is bad
then the return value will be InvalidArgument. If an argument is out of range
then the return value will be InvalidArgument. If the pen is deleted then the
return value will be GeneralFailure. If any other unexpected error occurs the
return value will be GeneralFailure.
154
Remarks
The Process Analyst only supports setting its axis in UTC (Universal Co-
ordinated Time) format. This means you must convert from local to UTC format
yourself to make the axis display correctly in local time. Cicode provides several
functions to do these conversions.
Limits
The horizontal axis has an upper limit of 1/1/2100 12:00:00.000 and a lower limit
of 1/1/1900 12:00:00.000. The minimum span is 100 milliseconds. The maximum
span is 200 years.
See Also IPen.GetHorizontalAxisTimeSpan [Method]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim startDate As Date
Dim endDate As Date
Dim startMs As Integer
Dim endMs As Integer
startDate = CDate(“16/6/2004 11:30:00”)
endDate = CDate(“16/6/2004 12:29:00”)
startMs = 0
endMs = 0
pen.PutHorizontalAxisTimeSpan startDate, startMs, endDate, endMs
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
REAL startDate;
REAL endDate;
startDate = StrToDate("16/6/04") + StrToTime("9:30:00");
endDate = StrToDate("16/6/04") + StrToTime("10:29:00");
startDate = TimeToOLEDate(startDate, 0); // Convert to UTC
endDate = TimeToOLEDate(endDate, 0); // Convert to UTC
_ObjectcallMethod(hPen, "PutHorizontalAxisTimeSpan", startDate, 0, endDate, 0);
END
IPen.PutVerticalAxisSp Sets the current position and span of the pens’ vertical axis.
an [Method] Defined As
[VBA] GetVerticalAxisSpan(startValue As Double, endValue As Double)
[Cicode] GetVerticalAxisSpan (REAL startValue, REAL endValue)
[C++] HRESULT GetVerticalAxisSpan (double* startValue, double*
endValue)
Parameters
startValue
[in] Indicates the new lower bound of the vertical axis.
endValue
155
IPen.RefreshData Clears all samples belonging to this pen from the internal cache and then issues
[Method] a new request for data.
Defined As
[VBA] RefreshData()
[Cicode] RefreshData ()
[C++] HRESULT RefreshData ()
Execution Result
If the function succeeds the return value will be Success. If the pen is deleted
then the return value will be GeneralFailure.
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
pen.RefreshData
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
_ObjectCallMethod(hPen, “RefreshData”);
END
156
[Cicode]
FUNCTION Example(OBJECT hPen)
_ObjectCallMethod(hPen, “Select”);
END
Execution Result
If the function succeeds the return value will be Success. If an argument is bad
then the return value will be InvalidArgument. If the pen is deleted then the
return value will be GeneralFailure.
See Also IPen.GetDefaultSpan [Method], IPen.ResetToDefaultSpan [Method]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
‘ Set span to 2 hours and 30 minutes
pen.GetDefaultSpan 0, 0, 2, 30, 0, 0
End Sub
158
[Cicode]
FUNCTION Example(OBJECT hPen)
// Set span to 2 hours and 30 minutes
_ObjectCallMethod(hPen, “SetDefaultSpan”, 0, 0, 2, 30, 0, 0);
END
IPen.SetQualityCompac Use this function to indicate what visual cue to display for single and multiple
tionPointType [Method] samples.
Defined As
[VBA] SetQualityCompactionPointType(compactionType As Integer,
pointType As Integer)
[Cicode] SetQualityCompactionPointType(INT compactionType, INT
pointType)
[C++] HRESULT SetQualityCompactionPointType(QualityCompactionType
compactionType, PointType pointType)
Parameters
compactionType
[in] Indicates which sample compaction type you want to set the visual cue
for.
pointType
[in] Indicates which visual cue to use for the selected compaction type.
Execution Result
If the function succeeds the return value will be Success. If an argument is bad,
the return value will be InvalidArgument. If an argument is out of range, the
return value will be InvalidArgument. If the pen is deleted, the return value will
be GeneralFailure.
See Also QualityCompactionType [Enumeration], PointType [Enumeration]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
‘ Set single samples to lsook like triangles
pen.SetQualityCompactionPointType 0, 5
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
// Set single samples to look like triangles
_ObjectCallMethod(hPen, "SetQualityCompactionPointType", 0, 5);
END
IPen.SetQualityLineStyl This function can be used to change the type of line drawn for each of the quality
e [Method] states defined by the Process Analyst for this Pen only.
Defined As
159
Execution Result
If the function succeeds the return value will be Success. If an argument is bad
then the return value will be InvalidArgument. If an argument is out of range
then the return value will be InvalidArgument. If the pen is deleted then the
return value will be GeneralFailure.
Remarks
When a sample is added to the display, its quality value indicates how the line
drawn from that sample to the next one will be displayed.
See Also QualityType [Enumeration], LineStyle [Enumeration]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
‘ Set all lines drawn after NA samples to be drawn as dash_dot
pen.SetQualityLineStyle 1, 3
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
// Set all lines drawn after NA samples to be drawn as dash_dot
_ObjectCallMethod(hPen, “SetQualityLineStyle”, 1, 3);
END
IPen.SetVerticalAxisLab This function can be used to display custom text for a particular value on the
elValue [Method] Vertical Axis.
Defined As
[VBA] SetVerticalAxisLabelValue(value As Double, label As String)
[Cicode] SetVerticalAxisLabelValue(REAL value, STRING label)
[C++] HRESULT SetVerticalAxisLabelValue(double value, BSTR label)
Parameters
value
[in] Indicates which value you want to replace with a custom label.
160
label
[in] Indicates the text that will be displayed instead of the specified value.
Execution Result
If the function succeeds the return value will be Success. If an argument is bad
then the return value will be InvalidArgument. If the pen is deleted then the
return value will be GeneralFailure.
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
‘ Change the vertical axis to display High High instead of 95
pen.SetVerticalAxisLabelValue 95, “High High”
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
// Change the vertical axis to display High High instead of 95
_ObjectCallMethod(hPen, “SetVerticalAxisLabelValue”, 95, “High High”);
END
[VBA]
Sub Example(pen As Object)
‘ Move the pen span forward one complete span
pen.VerticalScrollBy 1.0
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
// Move the pen span forward one complete span
_ObjectCallMethod(hPen, “VerticalScrollby”, 1.0);
END
IPen.VerticalZoom Zooms centrally into the time span by the given factor on the vertical axis
[Method] Defined As
[VBA] VerticalZoom(factor As Double)
[Cicode] VerticalZoom (REAL factor)
[C++] HRESULT VerticalZoom (double factor)
Parameters
factor
[in] Controls the direction and amount the axis will be zoomed. Acceptable
zoom values are 0 to 1 (Zoom out) and > 1 (zoom in).
Execution Result
If the function succeeds the return value will be Success. If the argument is bad
then the return value will be InvalidArgument. If the argument is out of range
then the return value will be InvalidArgument. If the pen is deleted then the
return value will be GeneralFailure.
See Also IPen.HorizontalZoom [Method]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
‘ Zoom out 50%
pen.VerticalZoom 0.5
‘ Undo the Zoom
pen.VerticalZoom 1.5
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
// Zoom out 50%
_ObjectCallMethod(hPen, “VerticalZoom”, 0.5);
// Undo the Zoom
_ObjectCallMethod(hPen, “VerticalZoom”, 2.0);
END
162
IPen.AxisBackgroundC Gets or sets the background color of the axis of this pen.
olor [Property][Get/Set] Defined As
[VBA] Long BackgroundColor
[Cicode] INT BackgroundColor
[C++] OLE_COLOR BackgroundColor
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted then the return value will be GeneralFailure.
Remarks
The background is the area underneath the axis lines and values.
To calculate the integer value required for a color apply the following formula
(65536 * Blue) + (256 * Green) + (Red). Where Red, Green and Blue are 0-255
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim backgroundColor As Long
‘Getting Property value
backgroundColor = pen.AxisBackgroundColor
‘Setting Property value to Red
pen.AxisBackgroundColor = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT backgroundColor;
// Getting current property value
backgroundColor = _ObjectGetProperty(hPen, “AxisBackgroundColor”);
// Setting Property to Red
_ObjectSetProperty(hPen, “AxisBackgroundColor”, PackedRGB(255, 0, 0));
END
IPen.BlockRepaint Use this property to halt or continue any drawing updates to this pen.
[Property][Get/Set] Defined As
[VBA] Boolean BlockRepaint
[Cicode] INT BlockRepaint
[C++] VARIANT_BOOL BlockRepaint
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted then the return value will be GeneralFailure.
Remarks
163
This property is useful if you are modifying several properties at once as it will
help reduce flicker and the amount of processing required. Simply set the
property to True (-1), change as many properties as you want, and then set the
property to False (0).
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim blockRepaint As Boolean
‘Getting Property value
blockRepaint = pen.BlockRepaint
‘Setting Property value
pen.BlockRepaint = True
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT bBlockRepaint;
// Getting current property value
bBlockRepaint = _ObjectGetProperty(hPen, “BlockRepaint”);
// Setting Property
_ObjectSetProperty(hPen, “BlockRepaint”, -1);
END
IPen.Collection Returns a reference to the Pens collection object that this pen belongs to.
[Property][Get] Defined As
[VBA] Object Collection
[Cicode] OBJECT Collection
[C++] IPen* Collection
Execution Result
If the property get succeeds the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim pens As Object
‘Getting Property value
Set pens = pen.Collection
End Sub
164
[Cicode]
FUNCTION Example(OBJECT hPen)
OBJECT pens;
// Getting current property value
pens = _ObjectGetProperty(hPen, “Collection”);
END
IPen.DataPoint Get or Set the trend/alarm tag which this pen is bound to.
[Property][Get/Set] Defined As
[VBA] String DataPoint
[Cicode] STRING DataPoint
[C++] BSTR DataPoint
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the tag is greater
than 79 characters, the return value will be InvalidArgument. If the pen is
deleted, the return value will be GeneralFailure.
Remarks
This property works in conjunction with the DataServer property. This property
can be changed during the lifetime of the pen. Changing the DataPoint property
will result in the data cache being cleared and a new data request issued. A
request for the tag’s information will also be issued.
See Also IPen.DataServer [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim tag As String
‘Getting Property value
tag = pen.DataPoint
‘Setting Property value
pen.DataPoint = “LOOP_1_PV”
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
STRING tag;
// Getting current property value
tag = _ObjectGetProperty(hPen, “DataPoint”);
// Setting Property
_ObjectSetProperty(hPen, “DataPoint”, “LOOP_1_PV”);
END
IPen.DataServer Get or Set the server that this pen is bound to.
[Property][Get/Set] Defined As
[VBA] String DataServer
165
IPen.Height Get or Set the physical height in pixels that the pen will allocate for itself when
[Property][Get/Set] displayed in Stacked mode.
Defined As
[VBA] Integer Height
[Cicode] INT Height
[C++] double Height
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If height set is out of
166
range (16 – 1000), the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Remarks
This property is ignored when the pen is not in Stacked mode.
See Also IPen.Stacked [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim height As Boolean
`Getting Property value
height = pen.Height
`Setting Property value
pen.Height = 75
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT height;
// Getting current property value
height = _ObjectGetProperty(hPen, "Height");
// Setting Property
_ObjectSetProperty(hPen, "Height", 75);
END
IPen.HorizontalAxisCol Gets or sets the color used to draw the line, labels, and interval markers of the
or [Property][Get/Set] horizontal axis of this pen.
Defined As
[VBA] Long HorizontalAxisColor
[Cicode] INT HorizontalAxisColor
[C++] OLE_COLOR HorizontalAxisColor
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Remarks
To calculate the integer value required for a color apply the following formula:
(65536 * Blue) + (256 * Green) + (Red)
where Red, Green, and Blue are 0-255.
See Also IPen.VerticalAxisColor [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
167
[VBA]
Sub Example(pen As Object)
Dim color As Long
‘Getting Property value
color = pen.HorizontalAxisColor
‘Setting Property value to Red
pen.HorizontalAxisColor = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT color;
// Getting current property value
color = _ObjectGetProperty(hPen, “HorizontalAxisColor”);
// Setting Property to Red
_ObjectSetProperty(hPen, “HorizontalAxisColor”, PackedRGB(255, 0, 0));
END
IPen.HorizontalAxisResi Gets or sets whether this pen allows the operator to interactively scale the
ze [Property][Get/Set] horizontal axis using the mouse.
Defined As
[VBA] Boolean HorizontalAxisResize
[Cicode] INT HorizontalAxisResize
[C++] VARIANT_BOOL HorizontalAxisResize
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Limits
True (-1): Axis can be resized
False (0): Axis cannot be resized
See Also IPen.VerticalAxisResize [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim resize As Boolean
‘Getting Property value
resize = pen.HorizontalAxisResize
‘Setting Property value
pen.HorizontalAxisResize = False
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT bResize;
// Getting current property value
168
IPen.HorizontalAxisScr Gets or sets whether this pen allows the operator to interactively scroll the
oll [Property][Get/Set] horizontal axis using the mouse.
Defined As
[VBA] Boolean HorizontalAxisScroll
[Cicode] INT HorizontalAxisScroll
[C++] VARIANT_BOOL HorizontalAxisScroll
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted then the return value will be GeneralFailure.
Limits
True (-1): Axis can be scrolled
False (0): Axis cannot be scrolled
See Also IPen.VerticalAxisScroll [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim scroll As Boolean
‘Getting Property value
scroll = pen.HorizontalAxisScroll
‘Setting Property value
pen.HorizontalAxisScroll = False
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT bScroll;
// Getting current property value
bScroll = _ObjectGetProperty(hPen, “HorizontalAxisScroll”);
// Setting Property
_ObjectSetProperty(hPen, “HorizontalAxisScroll”, 0);
END
IPen.HorizontalAxisWid Gets or sets the width of the horizontal axis line and the associated interval
th [Property][Get/Set] markers.
Defined As
[VBA] Integer HorizontalAxisWidth
[Cicode] INT HorizontalAxisWidth
[C++] short HorizontalAxisWidth
169
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Limits
A valid width is 0-8 pixels.
See Also IPen.VerticalAxisWidth [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim width As Integer
‘Getting Property value
width = pen.HorizontalAxisWidth
‘Setting Property value
pen.HorizontalAxisWidth = 3
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT width;
// Getting current property value
width = _ObjectGetProperty(hPen, “HorizontalAxisWidth”);
// Setting Property
_ObjectSetProperty(hPen, “HorizontalAxisWidth”, 3);
END
IPen.HorizontalGridline Gets or sets the color used to draw the major horizontal gridlines.
sColor [Property][Get/ Defined As
Set]
[VBA] Long HorizontalGridlinesColor
[Cicode] INT HorizontalGridlinesColor
[C++] OLE_COLOR HorizontalGridlinesColor
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Limits
A valid width is 0-8 pixels.
Remarks
To calculate the integer value required for a color apply the following formula
(65536 * Blue) + (256 * Green) + (Red). Where Red, Green and Blue are 0-255
See Also IPen.HorizontalMinorGridlinesColor [Property][Get/Set]
Calling Syntax
170
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim color As Long
‘Getting Property value
color = pen.HorizontalGridlinesColor
‘Setting Property value to Red
pen.HorizontalGridlinesColor = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT color;
// Getting current property value
color = _ObjectGetProperty(hPen, “HorizontalGridlinesColor”);
// Setting Property to Red
_ObjectSetProperty(hPen, “HorizontalGridlinesColor”, PackedRGB(255, 0, 0));
END
IPen.HorizontalGridline Gets or sets the line style used to draw the major horizontal gridlines.
sStyle [Property][Get/ Defined As
Set]
[VBA] Long HorizontalGridlinesStyle
[Cicode] INT HorizontalGridlinesStyle
[C++] LineStyle HorizontalGridlinesStyle
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the style is out of
range, the return value will be InvalidArgument. If the pen is deleted, the return
value will be GeneralFailure.
See Also IPen.HorizontalMinorGridlinesColor [Property][Get/Set], LineStyle
[Enumeration]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim style As Long
‘Getting Property value
style = pen.HorizontalGridlinesStyle
‘Setting Property value to Dot
pen.HorizontalGridlinesColor = 2
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT style;
// Getting current property value
style = _ObjectGetProperty(hPen, “HorizontalGridlinesStyle”);
171
IPen.HorizontalGridline Gets or sets the line width used when drawing the major horizontal gridlines.
sWidth [Property][Get/ Defined As
Set]
[VBA] Integer HorizontalGridlinesWidth
[Cicode] INT HorizontalGridlinesWidth
[C++] short HorizontalGridlinesWidth
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the width is out of
range, the return value will be InvalidArgument. If the pen is deleted, the return
value will be GeneralFailure.
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim width As Integer
‘Getting Property value
width = pen.HorizontalGridlinesWidth
‘Setting Property value
pen.HorizontalGridlinesWidth = 3
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT width;
// Getting current property value
width = _ObjectGetProperty(hPen, “HorizontalGridlinesWidth”);
// Setting Property t
_ObjectSetProperty(hPen, “HorizontalGridlinesWidth”, 3);
END
IPen.HorizontalMinorGri Gets or sets the color used to draw the minor horizontal gridlines.
dlinesColor Defined As
[Property][Get/Set]
[VBA] Long HorizontalMinorGridlinesColor
[Cicode] INT HorizontalMinorGridlinesColor
[C++] OLE_COLOR HorizontalMinorGridlinesColor
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Remarks
172
To calculate the integer value required for a color apply the following formula:
(65536 * Blue) + (256 * Green) + (Red)
where Red, Green, and Blue are 0-255.
See Also IPen.HorizontalGridlinesColor [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim color As Long
‘Getting Property value
color = pen.HorizontalMinorGridlinesColor
‘Setting Property value to Red
pen.HorizontalMinorGridlinesColor = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT color;
// Getting current property value
color = _ObjectGetProperty(hPen, “HorizontalMinorGridlinesColor”);
// Setting Property to Red
_ObjectSetProperty(hPen, “HorizontalMinorGridlinesColor”, PackedRGB(255, 0, 0));
END
IPen.HorizontalMinorGri Gets or sets the line style used to draw the minor horizontal gridlines.
dlinesStyle Defined As
[Property][Get/Set]
[VBA] Long HorizontalMinorGridlinesStyle
[Cicode] INT HorizontalMinorGridlinesStyle
[C++] LineStyle HorizontalMinorGridlinesStyle
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the style is out of
range, the return value will be InvalidArgument. If the pen is deleted, the return
value will be GeneralFailure.
See Also IPen.HorizontalGridlinesStyle [Property][Get/Set], LineStyle
[Enumeration]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim style As Long
‘Getting Property value
style = pen.HorizontalMinorGridlinesStyle
173
IPen.IsDeleted Returns whether this pen has been marked for deletion. That is, whether
[Property][Get] someone has called the Delete method on it or deleted it from the display.
Defined As
[VBA] Boolean IsDeleted
[Cicode] INT IsDeleted
[C++] VARIANT_BOOL IsDeleted
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
See Also IPen.Delete [Method]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim deleted As Boolean
deleted = pen.IsDeleted
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT bDeleted;
bDeleted = _ObjectGetProperty(hPen, “IsDeleted”);
END
IPen.IsSelected Returns whether this pen has been selected in the Process Analyst.
[Property][Get] Defined As
[VBA] Boolean IsSelected
[Cicode] INT IsSelected
[C++] VARIANT_BOOL IsSelected
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
174
IPen.LocalTime Get or Set whether the axis will display time in the computers current local
[Property][Get/Set] format or in UTC (Universal Time Coordinate).
Defined As
[VBA] Boolean LocalTime
[Cicode] INT LocalTime
[C++] VARIANT_BOOL LocalTime
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Limits
True (-1): Local format
False (0): UTC format
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim localTime As Boolean
‘Getting Property value
localTime = pen.LocalTime
‘Display time in UTC
pen.LocalTime = False
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT bLocalTime;
// Getting current property value
bLocalTime = _ObjectGetProperty(hPen, “LocalTime”);
175
IPen.RequestMode Get or Set how multiple samples will be calculated on the server.
[Property][Get/Set] Defined As
[VBA] Integer RequestMode
[Cicode] INT RequestMode
[C++] RequestMode RequestMode
176
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the mode is out of
range, the return value will be InvalidArgument. If the pen is deleted, the return
value will be GeneralFailure.
Remarks
When the pen makes a request for data and samples need to be compacted, it
will use this mode to determine how the compaction will occur.
Changing this mode will clear the data cache and issue a new request for data.
See Also RequestMode [Enumeration]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim requestMode As Integer
‘Getting Property value
requestMode = pen.RequestMode
‘Setting mode to minimum
pen.RequestMode = 1
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT requestMode;
// Getting current property value
requestMode = _ObjectGetProperty(hPen, “RequestMode”);
// Setting mode to minimum
_ObjectSetProperty(hPen, “RequestMode”, 1);
END
IPen.Stacked Get or Set whether the pen is visually displayed stacked or overlaid.
[Property][Get/Set] Defined As
[VBA] Boolean Stacked
[Cicode] INT Stacked
[C++] VARIANT_BOOL Stacked
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Limits
True (-1): Stacked
False (0): Overlaid
Remarks
177
When stacked, pens will be drawn under each other; when overlaid, the pens
will be drawn over the top of each other.
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim stacked As Boolean
‘Getting Property value
stacked = pen.Stacked
‘Setting Property value
pen.Stacked = True
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT bStacked;
// Getting current property value
bStacked = _ObjectGetProperty(hPen, “Stacked”);
// Setting property value
_ObjectSetProperty(hPen, “Stacked”, -1);
END
IPen.TrendCursorLabel Gets or sets the fill color used for any cursor label associated with this pen.
FillColor [Property][Get/ Defined As
Set]
[VBA] Long TrendCursorLabelFillColor
[Cicode] INT TrendCursorLabelFillColor
[C++] OLE_COLOR TrendCursorLabelFillColor
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted then the return value will be GeneralFailure.
Remarks
To calculate the integer value required for a color apply the following formula
(65536 * Blue) + (256 * Green) + (Red). Where Red, Green and Blue are 0-255.
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim color As Long
‘Getting Property value
color = pen. TrendCursorLabelFillColor
‘Setting Property value to Red
pen. TrendCursorLabelFillColor = 255
End Sub
178
[Cicode]
FUNCTION Example(OBJECT hPen)
INT color;
// Getting current property value
color = _ObjectGetProperty(hPen, “TrendCursorLabelFillColor”);
// Setting Property to Red
_ObjectSetProperty(hPen, “TrendCursorLabelFillColor”, PackedRGB(255, 0, 0));
END
IPen.TrendCursorLabel Gets or sets the border color used for any cursor label associated with this pen.
LineColor Defined As
[Property][Get/Set]
[VBA] Long TrendCursorLabelLineColor
[Cicode] INT TrendCursorLabelLineColor
[C++] OLE_COLOR TrendCursorLabelLineColor
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted then the return value will be GeneralFailure.
Remarks
To calculate the integer value required for a color apply the following formula
(65536 * Blue) + (256 * Green) + (Red). Where Red, Green and Blue are 0-255.
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim color As Long
‘Getting Property value
color = pen. TrendCursorLabelLineColor
‘Setting Property value to Red
pen. TrendCursorLabelLineColor = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT color;
// Getting current property value
color = _ObjectGetProperty(hPen, “TrendCursorLabelLineColor”);
// Setting Property to Red
_ObjectSetProperty(hPen, “TrendCursorLabelLineColor”, PackedRGB(255, 0, 0));
END
IPen.TrendCursorLabel Gets or sets the text color used for any cursor label associated with this pen.
TextColor Defined As
[Property][Get/Set]
[VBA] Long TrendCursorLabelTextColor
[Cicode] INT TrendCursorLabelTextColor
179
IPen.VerticalAxisAutosc Gets or sets whether the vertical axis will automatically calculate its physical
ale [Property][Get/Set] limits based on the sample values within its internal cache.
Defined As
[VBA] Boolean VerticalAxisAutoscale
[Cicode] INT VerticalAxisAutoscale
[C++] VARIANT_BOOL VerticalAxisAutoscale
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted then the return value will be GeneralFailure.
Remarks
Setting this property will turn off interactive Scrolling
(IPen.HorizontalAxisScroll) and Scaling (IPen.HorizontalAxisResize).
Limits
True (-1): Autoscale enabled
180
IPen.VerticalAxisColor Gets or sets the color used to draw the line, labels and interval markers of the
[Property][Get/Set] vertical axis of this pen.
Defined As
[VBA] Long VerticalAxisColor
[Cicode] INT VerticalAxisColor
[C++] OLE_COLOR VerticalAxisColor
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted then the return value will be GeneralFailure.
Remarks
To calculate the integer value required for a color apply the following formula
(65536 * Blue) + (256 * Green) + (Red). Where Red, Green and Blue are 0-255.
See Also IPen.HorizontalAxisColor [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim color As Long
‘Getting Property value
color = pen.VerticalAxisColor
‘Setting Property value to Red
pen.VerticalAxisColor = 255
End Sub
181
[Cicode]
FUNCTION Example(OBJECT hPen)
INT color;
// Getting current property value
color = _ObjectGetProperty(hPen, “VerticalAxisColor”);
// Setting Property to Red
_ObjectSetProperty(hPen, “VerticalAxisColor”, PackedRGB(255, 0, 0));
END
IPen.VerticalAxisLabelT Gets or sets a unit type which can be applied to the axis labels. This allows
ype [Property][Get/Set] numbers on the axis to display with their unit. For example, setting the unit to
“kg” will display “10 Kg” on the axis.
Defined As
[VBA] Integer VerticalAxisLabelType
[Cicode] INT VerticalAxisLabelType
[C++] AxisLabelType VerticalAxisLabelType
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the pen is
deleted then the return value will be GeneralFailure.
Remarks
Label Types are fixed and cannot be added to.
See Also AxisLabelType [Enumeration]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim labelType As Integer
‘Getting Property value
labelType = pen.VerticalAxisLabelType
‘Setting Property value to Percent
pen.VerticalAxisLabelType= 3
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT labelType;
// Getting current property value
labelType = _ObjectGetProperty(hPen, “VerticalAxisLabelType”);
// Setting Property to Percent
_ObjectSetProperty(hPen, “VerticalAxisLabelType”, 3);
END
IPen.VerticalAxisResize Gets or sets whether this pen allows the operator to interactively scale the
[Property][Get/Set] vertical axis by using the mouse.
Defined As
182
IPen.VerticalAxisScroll Gets or sets whether this pen allows the operator to interactively scroll the
[Property][Get/Set] vertical axis by using the mouse.
Defined As
[VBA] Boolean VerticalAxisScroll
[Cicode] INT VerticalAxisScroll
[C++] VARIANT_BOOL VerticalAxisScroll
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
183
Limits
True (-1): Enable scrolling
False (0): Disable scrolling
Remarks
This only applies to analog pens.
See Also IPen.HorizontalAxisScroll [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim scroll As Boolean
‘Getting Property value
scroll = pen.VerticalAxisScroll
‘Setting Property value
pen.VerticalAxisScroll = False
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT bScroll;
// Getting current property value
bScroll = _ObjectGetProperty(hPen, “VerticalAxisScroll”);
// Setting Property
_ObjectSetProperty(hPen, “VerticalAxisScroll”, 0);
END
IPen.VerticalAxisWidth Gets or sets the width of the vertical axis line and the associated interval
[Property][Get/Set] markers.
Defined As
[VBA] Integer VerticalAxisWidth
[Cicode] INT VerticalAxisWidth
[C++] short VerticalAxisWidth
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Limits
A valid width is 0-8 pixels.
Remarks
This only applies to analog pens.
See Also IPen.HorizontalAxisWidth [Property][Get/Set]
Calling Syntax
184
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim width As Integer
‘Getting Property value
width = pen.VerticalAxisWidth
‘Setting Property value
pen.VerticalAxisWidth = 3
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT width;
// Getting current property value
width = _ObjectGetProperty(hPen, “VerticalAxisWidth”);
// Setting Property
_ObjectSetProperty(hPen, “VerticalAxisWidth”, 3);
END
IPen.VerticalGridlinesC Gets or sets the color used to draw the major vertical gridlines.
olor [Property][Get/Set] Defined As
[VBA] Long VerticalGridlinesColor
[Cicode] INT VerticalGridlinesColor
[C++] OLE_COLOR VerticalGridlinesColor
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Remarks
To calculate the integer value required for a color apply the following formula
(65536 * Blue) + (256 * Green) + (Red). Where Red, Green and Blue are 0-255.
See Also IPen.VerticalMinorGridlinesColor [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim color As Long
‘Getting Property value
color = pen.VerticalGridlinesColor
‘Setting Property value to Red
pen. VerticalGridlinesColor = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT color;
// Getting current property value
185
IPen.VerticalGridlinesSt Gets or sets the line style used to draw the major vertical gridlines.
yle [Property][Get/Set] Defined As
[VBA] Long VerticalGridlinesColor
[Cicode] INT VerticalGridlinesColor
[C++] LineStyle VerticalGridlinesColor
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the style is out of
range, the return value will be InvalidArgument. If the pen is deleted, the return
value will be GeneralFailure.
See Also IPen.VerticalMinorGridlinesStyle [Property][Get/Set], LineStyle
[Enumeration]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim style As Long
‘Getting Property value
style = pen.VerticalGridlinesColor
‘Setting Property value to Dot
pen.VerticalGridlinesColor = 2
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT style;
// Getting current property value
style = _ObjectGetProperty(hPen, “VerticalGridlinesStyle”);
// Setting Property to Dot
_ObjectSetProperty(hPen, “VerticalGridlinesStyle”, 2);
END
IPen.VerticalGridlinesW Gets or sets the line width used when drawing the major vertical gridlines.
idth [Property][Get/Set] Defined As
[VBA] Integer VerticalGridlinesWidth
[Cicode] INT VerticalGridlinesWidth
[C++] short VerticalGridlinesWidth
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the width is out of
186
range, the return value will be InvalidArgument. If the pen is deleted, the return
value will be GeneralFailure.
Limits
A valid width is 0-8 pixels.
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim width As Integer
‘Getting Property value
width = pen.VerticalGridlinesWidth
‘Setting Property value
pen.VerticalGridlinesWidth = 3
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT width;
// Getting current property value
width = _ObjectGetProperty(hPen, “VerticalGridlinesWidth”);
// Setting Property t
_ObjectSetProperty(hPen, “VerticalGridlinesWidth”, 3);
END
IPen.VerticalMinorGridli Gets or sets the color used to draw the minor vertical gridlines.
nesColor Defined As
[Property][Get/Set]
[VBA] Long VerticalMinorGridlinesColor
[Cicode] INT VerticalMinorGridlinesColor
[C++] OLE_COLOR VerticalMinorGridlinesColor
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the pen is deleted,
the return value will be GeneralFailure.
Remarks
To calculate the integer value required for a color apply the following formula
(65536 * Blue) + (256 * Green) + (Red). Where Red, Green and Blue are 0-255.
See Also IPen.VerticalGridlinesColor [Property][Get/Set]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim color As Long
‘Getting Property value
color = pen. VerticalMinorGridlinesColor
187
IPen.VerticalMinorGridli Gets or sets the line style used to draw the minor vertical gridlines.
nesStyle [Property][Get/ Defined As
Set]
[VBA] Long VerticalMinorGridlinesStyle
[Cicode] INT VerticalMinorGridlinesStyle
[C++] LineStyle VerticalMinorGridlinesStyle
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the style is out of
range, the return value will be InvalidArgument. If the pen is deleted, the return
value will be GeneralFailure.
See Also IPen.VerticalGridlinesStyle [Property][Get/Set], LineStyle
[Enumeration]
Calling Syntax
Assumes you have passed a valid pen object into the function.
[VBA]
Sub Example(pen As Object)
Dim style As Long
‘Getting Property value
style = pen.VerticalMinorGridlinesStyle
‘Setting Property value to Dot
pen.VerticalMinorGridlinesColor = 2
End Sub
[Cicode]
FUNCTION Example(OBJECT hPen)
INT style;
// Getting current property value
style = _ObjectGetProperty(hPen, “VerticalMinorGridlinesStyle”);
// Setting Property to Dot
_ObjectSetProperty(hPen, “VerticalMinorGridlinesStyle”, 2);
END
IPen.Visible Get or set whether this pen will be visually shown (True) or hidden (False) to the
[Property][Get/Set] operator.
Defined As
188
IPens Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IPens
Methods (2)
IPens.Create [Method]
IPens.RemoveAll [Method]
Properties (5)
IPens.Count [Property][Get]
IPens.Item [Property][Get]
IPens._NewEnum [Property][Get]
IPens.ItemByName [Property][Get]
IPens.Pane[Property][Get]
189
IPens.Item Gets the Pen at the given index from this pen’s collection.
[Property][Get] Defined As
[VBA] Item(index As Long) as Object
[Cicode] OBJECT Item(INT index)
[C++] Item(int index, IPen* Item)
Parameters
index
[in] Indicates the index of the pen item to return from this collection. (One
based)
Execution Result
If the property get succeeds, the return value will be Success. If the index is out
of range, the return value will be InvalidArgument. If the pen’s collection is
deleted, the return value will be GeneralFailure.
Calling Syntax
This example assumes there is a valid Pens collection object to be passed into the
example methods.
[VBA]
Sub Example(pens As Object)
Dim pen As Object
‘Getting Property value
Set pen = pens.Item(1)
End Sub
[Cicode]
FUNCTION Example(OBJECT hPens)
// Getting property value
OBJECT hPen = _ObjectCallMethod(hPens, "get_Item", 1);
END
IPens.ItemByName Gets the Pen of the given name from this Pens collection.
[Property][Get] Defined As
192
Execution Result
If the property get succeeds, the return value will be Success. If the pen does not
exist, the return value will be InvalidArgument. If the pens collection is deleted,
the return value will be GeneralFailure.
Calling Syntax
This example assumes there is a valid Pens collection object to be passed into the
example methods.
[VBA]
Sub Example(Pens As Object)
Dim pen As Object
‘Getting Property value
Set pen = Pens.ItemByName(“CPU Usage”)
End Sub
[Cicode]
FUNCTION Example(OBJECT hPens)
// Getting property value
OBJECT hPen = _ObjectCallMethod(hPens, "get_ItemByName", "CPU Usage");
END
IPens.Pane[Property][G Gets the Pane that this Pens collection belongs to.
et] Defined As
[VBA] Object Pane
[Cicode] OBJECT Pane
[C++] HRESULT Pane(IPane** Pane)
Execution Result
If the property get succeeds the return value will be Success. If the pens
collection is deleted the return value will be GeneralFailure.
Remarks
Each Pens collection belongs to a Pane.
Calling Syntax
This example assumes there is a valid Pens collection object to be passed into the
example methods.
193
[VBA]
Sub Example(pens As Object)
Dim pane As Object
‘Getting Property value
Set pane = pens.Pane
End Sub
[Cicode]
FUNCTION Example(OBJECT hPens)
// Getting property value
OBJECT hPane = _ObjectGetProperty(hPens, "Pane");
END
IProcessAnalyst Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IProcessAnalyst
Methods
IProcessAnalyst.BlockUpdates [Method]
IProcessAnalyst.UnBlockUpdates [Method]
IProcessAnalyst.CopyToClipboard [Method]
IProcessAnalyst.CopyToFile [Method]
IProcessAnalyst.FreezeEvent [Method]
IProcessAnalyst.LoadFromFile [Method]
IProcessAnalyst.PrintAll [Method]
IProcessAnalyst.SaveToFile [Method]
IProcessAnalyst.ShowProperties [Method]
IProcessAnalyst.SubscribeForPropertyChange [Method]
IProcessAnalyst.SynchroniseToNow [Method]
IProcessAnalyst.UnsubscribePropertyChange [Method]
Properties
IProcessAnalyst.AdminPrivilegeLevel [Property] [Get]
IProcessAnalyst.AutoScroll [Property][Get/Set]
IProcessAnalyst.BackgroundColor [Property][Get/Set]
IProcessAnalyst.CommandSystem [Property][Get]
IProcessAnalyst.ContextMenu [Property][Get/Set]
IProcessAnalyst.Cursors [Property][Get]
IProcessAnalyst.DataRequestRate [Property][Get/Set]
IProcessAnalyst.DisplayRefreshRate [Property][Get/Set]
IProcessAnalyst.Language [Property] [Get/Set]
IProcessAnalyst.LastSelectedPen [Property][Get]
IProcessAnalyst.LockedPens [Property][Get/Set]
IProcessAnalyst.ObjectView [Property][Get]
IProcessAnalyst.NumberofSamples[Property][Get/Set]
IProcessAnalyst.Panes [Property][Get]
IProcessAnalyst.PrimaryPath [Property][Get/Set]
IProcessAnalyst.SecondaryPath [Property][Get/Set]
IProcessAnalyst.Toolbars [Property][Get]
194
IProcessAnalyst.WritePrivilegeLevel [Property][Get]
IProcessAnalyst.ZoomMode [Property][Get/Set]
IProcessAnalyst.BlockU Blocks certain aspects of the Process Analyst’s redrawing and data updating.
pdates [Method] Defined As
[VBA] BlockUpdates()
[Cicode] BlockUpdates()
[C++] HRESULT BlockUpdates()
Remarks
This method blocks three redraw systems: redraw for the chart, the Object
View, and the toolbars.
Data updates are also blocked.
The current data requests are all cancelled.
The Process Analyst has a built-in counter to store how many times the
block and unblock have been called, so that only the final UnBlockUpdates
call actually unblocks the above mentioned data updates and redraw
systems.
See Also IProcessAnalyst.UnBlockUpdates [Method]
Execution Result
If the function suceeds, the return value will be Success. If the function fails, the
return value will be general failure.
Calling Syntax
This example assumes there is a valid Process Analyst object to be passed into
the example methods.
[VBA]
Sub Example(ProcessAnalyst As Object)
ProcessAnalyst.BlockUpdates()
End Sub
[Cicode]
FUNCTION Example(OBJECT hProcessAnalyst)
_ObjectCallMethod(hProcessAnalyst, “BlockUpdates”);
END
IProcessAnalyst.UnBlo Unblocks certain aspects of the Process Analyst’s redrawing and data updating.
ckUpdates [Method] Defined As
[VBA] UnblockUpdates()
[Cicode] UnblockUpdates()
[C++] HRESULT UnblockUpdates()
Remarks
This method unblocks three redraw systems: redraw for the chart, the Object
View, and the toolbars.
195
IProcessAnalyst.CopyT Copies the data in the current viewable range for all visible pens to the
oClipboard [Method] clipboard.
Defined As
[VBA] CopyToClipboard()
[Cicode] CopyToClipboard()
[C++] HRESULT CopyToClipboard()
Remarks
The timestamp of each sample will be in local time defined by your computer.
The start and end sample maybe generated for each pen to indicate the exported
range of the data.
Execution Result
If the function succeeds the return value will be Success. If the function fails the
return value will be GeneralFailure.
See Also IProcessAnalyst.CopyToFile [Method]
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
196
[VBA]
Sub Example()
myPage_AN35.CopyToClipboard
End Sub
[Cicode]
Sub Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
_ObjectCallMethod(hProcessAnalyst, “CopyToClipboard”);
End Sub
IProcessAnalyst.CopyT Saves the data in the current viewable range for all visible pens to the specified
oFile [Method] file.
Defined As
[VBA] CopyToFile(filename As String)
[Cicode] CopyToFile(STRING filename)
[C++] HRESULT CopyToClipBoard(BSTR filename)
Parameters
filename
[in] Indicates the name and path of the file that the data will be exported to.
Execution Result
If the function succeeds the return value will be Success. If the function fails the
return value will be GeneralFailure.
Remarks
The timestamp of each sample will be in local time defined by your computer.
The start and end sample maybe generated for each pen to indicate the exported
range of the data.
See Also IProcessAnalyst.CopyToClipboard [Method]
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
myPage_AN35.CopyToFile “test.xls”
End Sub
[Cicode]
Sub Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
_ObjectCallMethod(hProcessAnalyst, “CopyToFile”, “test.xls”);
End Sub
Execution Result
If the function succeeds the return value will be Success. If the filename is
invalid the return value will be InvalidArgument. If the path indicated by
fileLocation is invalid or offline then the return value will be PathNotFound. If
any other problem occurs then the return value will be GeneralFailure.
Remarks
This method will replace the current view with the one in the specified file.
Absolute paths are not required for the filename as the method has been
designed to load the specified file from your project
directory(FileLocation_Local), my documents folder (FileLocation_User) or
from the primary/secondary paths (FileLocation_Server).
When a file is loaded it will be synchronized with the other locations to ensure
each location has the file which is the latest. If the file you are loading is older
then one which exists in another location it will be replaced. Synchronization
will not occur when loaded from a Web-client.
See Also FileLocation [Enumeration], IProcessAnalyst.PrimaryPath
[Property][Get/Set], IProcessAnalyst.SecondaryPath [Property][Get/
Set]
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
‘ Load the view from the server
myPage_AN35.LoadFromFile “Analyst Views\Test1.pav”, 1
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
_ObjectCallMethod(hProcessAnalyst, “LoadFromFile”,“AnalystViews\Test1.pav”, 1);
END
[VBA]
Sub Example()
myPage_AN35.PrintAll
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
_ObjectCallMethod(hProcessAnalyst, “PrintAll”);
END
IProcessAnalyst.SaveT Saves the current view using the specified name to the specified location.
oFile [Method] Defined As
[VBA] SaveToFile(filename As String, fileLocation As Integer)
[Cicode] SaveToFile(STRING filename, INT fileLocation)
[C++] HRESULT SaveToFile(BSTR filename, FileLocation fileLocation)
Parameters
filename
[in] Indicates a relative path and filename which will be used during the
saving of the view. See Remarks.
fileLocation
[in] Indicates which known location to save the file to.
Execution Result
If the function succeeds the return value will be Success. If the filename is
invalid the return value will be InvalidArgument. If the path indicated by
fileLocation is invalid or offline then the return value will be PathNotFound. If
any other problem occurs, the return value will be GeneralFailure.
Remarks
On a client where the current user matches the WritePrivilegeLevel only the
FileLocation_Server and FileLocation_User options will succeed. Saving using
the FileLocation_Server option will save to the locations indicated by
PrimaryPath and SecondaryPath properties and into the Project directory.
On a client where the current user does not match the WritePrivilegeLevel only
the FileLocation_User will succeed.
On a webclient the FileLocation_User is the only option which will succeed.
See Also FileLocation [Enumeration], IProcessAnalyst.PrimaryPath
[Property][Get/Set], IProcessAnalyst.SecondaryPath
[Property][Get/Set], IProcessAnalyst.WritePrivilegeLevel
[Property][Get]
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
200
[VBA]
Sub Example()
‘ Save the view to the server and project
myPage_AN35.SaveToFile “Analyst Views\Test1.pav”, 1
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
‘ Save the view to the server and project
_ObjectCallMethod(hProcessAnalyst, “SaveToFile”, “Analyst
Views\Test1.pav”, 1);
END
IProcessAnalyst.Subscr Use this method to receive notifications of when a particular property changes.
ibeForPropertyChange Notifications will be sent via the PropertyChanged event.
[Method] Defined As
[VBA] SubscribeForPropertyChange(interfaceName As String,
propertyName As String)
[Cicode] SubscribeForPropertyChange(STRING interfaceName, STRING
propertyName)
[C++] HRESULT SubscribeForPropertyChange(BSTR interfaceName, BSTR
propertyName)
Parameters
201
interfaceName
[in] Specify the name of the interface that the property you want
notifications for is defined on.
propertyName
[in] This is the name of the property you want to receive notifications for.
Execution Result
If the function succeeds, the return value will be Success. If the interfaceName or
propertyName is a bad string, the return value will be InvalidArgument. If any
other problem occurs, the return value will be GeneralFailure.
Remarks
The following set of properties are supported:
Interface name Property Name
IProcessAnalyst AutoScroll
IProcessAnalyst BackgroundColor
IProcessAnalyst ContextMenu
IProcessAnalyst LockedPens
IProcessAnalyst DisplayRefreshRate
IProcessAnalyst DataRequestRate
IProcessAnalyst ZoomMode
See Also IProcessAnalyst.UnsubscribePropertyChange [Method],
PropertyChanged [Event]
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
myPage_AN35.SubscribeForPropertyChange “IProcessAnalyst”, “ZoomMode”
End Sub
[Cicode]
Sub Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
_ObjectCallMethod(hProcessAnalyst,“SubscribeForPropertyChange”, “IProcessAnalyst”,
“ZoomMode”);
End Sub
IProcessAnalyst.Synchr Synchronizes all pens such that the date/time reflects “Now.”
oniseToNow [Method] Defined As
[VBA] SynchroniseToNow
[Cicode] SynchroniseToNow()
[C++] HRESULT SynchroniseToNow()
Execution Result
202
If the function succeeds, the return value will be Success. If any other problem
occurs, the return value will be GeneralFailure.
Remarks
The current span for each pen will be maintained. ‘Now’ is defined as the
current time on the client machine.
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
myPage_AN35.SynchroniseToNow
End Sub
[Cicode]
Sub Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
_ObjectCallMethod(hProcessAnalyst, “SynchroniseToNow”);
End Sub
IProcessAnalyst.Unsub Use this method to cancel notifications of when the specified property changes.
scribePropertyChange Notifications will cease to be sent via the PropertyChanged event.
[Method] Defined As
[VBA] UnsubscribePropertyChange(interfaceName As String,
propertyName As String)
[Cicode] UnsubscribePropertyChange(STRING interfaceName, STRING
propertyName)
[C++] HRESULT UnsubscribePropertyChange(BSTR interfaceName, BSTR
propertyName)
Parameters
interfaceName
[in] Name of the interface that the property you want to remove
notifications for is defined on.
propertyName
[in] Name of the property you want to remove notifications for.
Execution Result
If the function succeeds, the return value will be Success. If the interfaceName or
propertyName is a bad string, the return value will be InvalidArgument. If any
other problem occurs, the return value will be GeneralFailure.
See Also IProcessAnalyst.SubscribeForPropertyChange [Method],
PropertyChanged [Event]
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
203
[VBA]
Sub Example()
myPage_AN35.UnsubscribePropertyChange “IProcessAnalyst”,“ZoomMode”
End Sub
[Cicode]
Sub Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
_ObjectCallMethod(hProcessAnalyst, “UnsubscribePropertyChange”,“IProcessAnalyst”,
“ZoomMode”);
End Sub
IProcessAnalyst.Admin Retrieves the privilege level currently set for controlling administration features
PrivilegeLevel of the Process Analyst at Run-time.
[Property] [Get] Defined As
[VBA] Integer AdminPrivilegeLevel
[Cicode] INT AdminPrivilegeLevel
[C++] short AdminPrivilegeLevel
Execution Result
If the property get succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument.
Remarks
By default the level is 0 (Zero), which allows access to all features at run time.
Setting this to any other level will require the operator viewing the Process
Analyst to have a privilege equal to that level.
This property can only be set at design time (in the Graphics Builder property
pages) and is recommended to prevent Operators from changing performance
properties such as DataRequestRate and DisplayRefreshRate.
Limits
Privilege level defined in Vijeo Citect 1 - 8. 0 = no security.
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim privilege As Boolean
‘Getting Property value
privilege = myPage_AN35.AdminPrivilegeLevel
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
INT privilege;
// Getting current property value
204
privilege = _ObjectGetProperty(hProcessAnalyst,
“AdminPrivilegeLevel”);
END
IProcessAnalyst.AutoS Gets or Sets the automatic scrolling of all pens as time passes.
croll [Property][Get/Set] Defined As
[VBA] Boolean AutoScroll
[Cicode] INT AutoScroll
[C++] VARIANT_BOOL AutoScroll
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Remarks
This function does not synchronize the pens to now. The display will be updated
according to the value of the DisplayRefreshRate property.
Limits
True (-1): Autoscroll is On
False (0): Autoscroll is Off
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim autoScroll As Boolean
‘Getting Property value
autoScroll = myPage_AN35.AutoScroll
‘Setting Property value
myPage_AN35.AutoScroll = True
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
INT autoScroll;
// Getting current property value
autoScroll = _ObjectGetProperty(hProcessAnalyst, “AutoScroll”);
// Setting Property to true
_ObjectSetProperty(hProcessAnalyst, “AutoScroll”, -1);
END
IProcessAnalyst.Backgr Gets or sets the background color for the Process Analyst.
oundColor Defined As
[Property][Get/Set]
[VBA] Long BackgroundColor
[Cicode] INT BackgroundColor
205
IProcessAnalyst.Comm Gets a reference to the Process Analyst’s Command System object. With this
andSystem object you can execute commands, query command information, and create
your own custom commands.
[Property][Get]
Defined As
[VBA] Object CommandSystem
[Cicode] OBJECT CommandSystem
[C++] ICommandSystem* CommandSystem
Execution Result
If the property get succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument.
206
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim commandSystem As Object
‘Retrieve command system
Set commandSystem = myPage_AN35.CommandSystem
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
OBJECT hCommandSystem;
// Retrieve command system
hCommandSystem = _ObjectGetProperty(hProcessAnalyst, “CommandSystem”);
END
IProcessAnalyst.Contex Enables or disables the context menu which is displayed at Run-time when an
tMenu [Property][Get/ operator clicks the right mouse button on the graphical display.
Set] Defines As
[VBA] Boolean ContextMenu
[Cicode] INT ContextMenu
[C++] VARIANT_BOOL ContextMenu
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument.
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim contextMenu As Boolean
‘Getting Property value
contextMenu = myPage_AN35.ContextMenu
‘Disable the context menu
myPage_AN35.ContextMenu = False
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
INT contextMenu;
// Getting current property value
contextMenu =_ObjectGetProperty(hProcessAnalyst,“ContextMenu”);
// Disable the context menu
_ObjectSetProperty(hProcessAnalyst, “ContextMenu”, 0);
END
207
IProcessAnalyst.Cursor Gets a reference to the Process Analyst’s cursors collection. With this object you
s [Property][Get] can create new, and browse existing cursors.
Defined As
[VBA] Object Cursors
[Cicode] OBJECT Cursors
[C++] ICursors* Cursors
Execution Result
If the property get succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument.
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim cursors As Object
‘Retrieve cursors collection
Set cursors = myPage_AN35.Cursors
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
OBJECT hCursors;
// Retrieve cursor collection
hCursors = _ObjectGetProperty(hProcessAnalyst, “Cursors”);
END
IProcessAnalyst.DataRe Indicates how often (in milliseconds) the Process Analyst Control will request
questRate data from the trend server(s). Internally the Process Analyst will choose the most
optimum request rate for data, but this property can be used to slow the request
[Property][Get/Set]
down further.
Defined As
[VBA] Integer DataRequestRate
[Cicode] INT DataReqestRate
[C++] short DataRequestRate
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument.
Remarks
This property is useful for controlling the load on a trend server. The higher the
figure the less load will be put on the trend server(s).
Limits
Minimum = 10 milliseconds
208
IProcessAnalyst.Displa Indicates how fast the Process Analyst Control display is updated in
yRefreshRate milliseconds. The default is an update of 1 second, which provides optimum
client performance and visual feedback.
[Property][Get/Set]
Defined As
[VBA] Integer DisplayRefreshRate
[Cicode] INT DisplayRefreshRate
[C++] short DisplayRefreshRate
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Remarks
This property is useful for controlling the performance of a client (CPU usage).
Limits
Minimum = 10 milliseconds (most machines will not be fast enough to keep
up).
Maximum = 60000 milliseconds (1 minute).
Default = 1000 milliseconds (1 second).
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
209
[VBA]
Sub Example()
Dim requestRate As Integer
‘Retrieve request rate
requestRate = myPage_AN35.DisplayRefreshRate
‘Set request rate
myPage_AN35.DisplayRefreshRate = 2000
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
INT requestRate;
// Retrieve request rate
requestRate = _ObjectGetProperty(hProcessAnalyst, “DisplayRefreshRate”);
// Set request rate
_ObjectSetProperty(hProcessAnalyst, “DisplayRefreshRate”, 2000);
END
IProcessAnalyst.Langu This function allows dynamic changing of the user interface to the language
age [Property] [Get/Set] specified.
Defined As
[VBA] String Language
[Cicode] STRING Language
[C++] BSTR Language
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Remarks
To change languages you must have additional localized resource .dll files
alongside the main resources.dll file. Additional language .dll files are named
(and should be named) using the format “Resources_<languagecode>.dll”. The
Process Analyst expects this format or the language will not be loaded.
For example, if you have a Chinese resource dll named “Resources_zh-CN.dll”,
set the Language property to “zh-CN”. The .dll files are named according to the
RFC 1766 standard for specifying culture names.
Specifying “.” resets the language back to the default.
Note: This method is not required to be called if you are using Vijeo Citect’s
multilanguage feature to make the Process Analyst switch languages. For
details, see Multi-language Support.
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
210
[VBA]
Sub Example()
Dim language As String
‘Retrieve current language
language = myPage_AN35.Language
‘Set language to Japanese
myPage_AN35.Language = “ja-JP”
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
STRING language;
// Retrieve current language
language = _ObjectGetProperty(hProcessAnalyst, “Language”);
// Set language to Japanese
_ObjectSetProperty(hProcessAnalyst, “Language”, “ja-JP”);
END
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
OBJECT selectedPen;
// Retrieve primary selection
selectedPen = _ObjectGetProperty(hProcessAnalyst, “LastSelectedPen”);
END
IProcessAnalyst.Locke Determines whether all the pens across all panes in the Process Analyst control
dPens [Property][Get/ are locked together.
Set] Defined As
[VBA] Boolean LockedPens
[Cicode] INT LockedPens
[C++] VARIANT_BOOL LockedPens
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument.
Remarks
While this property is enabled, any operation applied to the selected pen is
applied to all pens. When the property is disabled, the pens will lose the lock
logic, and any interaction technique will apply to the individual pen with
selection focus.
If this property is disabled and then enabled, all pens assume the same scale,
timespan, and end time position as the selected pen.
Limits
True (-1): Pens are locked.
False (0): Pens are unlocked.
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim locked As Boolean
‘Get current locked status
locked = myPage_AN35.LockedPens
‘Turn off locked Pens
myPage_AN35.LockedPens = False
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
OBJECT lockedPens;
// Get current locked status
lockedPens = _ObjectGetProperty(hProcessAnalyst, “LockedPens”);
212
IProcessAnalyst.Object Gets a reference to the ObjectView object. With this object you can manipulate
View [Property][Get] the look of the ObjectView.
Defined As
[VBA] Object ObjectView
[Cicode] OBJECT ObjectView
[C++] IObjectView* ObjectView
Execution Result
If the property get succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument.
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim objectView As Object
‘Retrieve the objectview
Set objectView = myPage_AN35.ObjectView
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
OBJECT objectView;
// Retrieve the objectview
objectView = _ObjectGetProperty(hProcessAnalyst, “ObjectView”);
END
IProcessAnalyst.Numbe Specifies the date/time axis span of each pen in number of samples. More or less
rofSamples[Property][G detail for each pen can be displayed by increasing or decreasing the value of this
property respectively.
et/Set]
Note: The value entered into the Number of Samples box in the Process Analyst
Properties dialog box is closely tied to the display resolution. The default setting
is ideal for screen resolutions from 1024x768 to 1280x1024. The association
between Number of Samples and the display resolution occurs because for each
sample shown on screen the Process Analyst attempts to leave a small gap to
allow for sample markers. Because the Process Analyst shows samples when
they occur, it requires less data than a traditional trend client. Retrieving data is
expensive and the more data you retrieve the more time the request takes. It is
recommended that this parameter not exceed 500.
Defined As
[VBA] Integer NumberofSamples
[Cicode] INT NumberofSamples
213
IProcessAnalyst.Panes Gets a reference to the Panes collection. With this object you can create new, and
[Property][Get] browse existing panes.
Defined As
[VBA] Object Panes
[Cicode] OBJECT Panes
[C++] IPanes* Panes
Execution Result
214
If the property get succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument.
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim panes As Object
‘Retrieve the panes collection
Set panes = myPage_AN35.Panes
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
OBJECT panes;
// Retrieve the panes collection
panes = _ObjectGetProperty(hProcessAnalyst, “Panes”);
END
IProcessAnalyst.Primar Specifies the primary location for saving and loading Process Analyst views.
yPath [Property][Get/ Defined As
Set]
[VBA] String PrimaryPath
[Cicode] STRING PrimaryPath
[C++] BSTR PrimaryPath
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Remarks
The primary and secondary path properties together provide a file redundancy
option for large systems that need to store Process Analyst Views in a shared
location. Whenever a load operation occurs from either of these locations, the
loaded file will be synchronized with each location, such that the latest version
of the file appears in both locations.
See Also IProcessAnalyst.SecondaryPath [Property][Get/Set],
IProcessAnalyst.LoadFromFile [Method], IProcessAnalyst.SaveToFile
[Method]
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim path As String
‘Retrieve the path
path = myPage_AN35.PrimaryPath
215
IProcessAnalyst.Secon Specifies the secondary location for saving and loading Process Analyst views.
daryPath Defined As
[Property][Get/Set]
[VBA] String SecondaryPath
[Cicode] STRING SecondaryPath
[C++] BSTR SecondaryPath
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Remarks
The secondary and primary path properties together provide a file redundancy
option for large systems that need to store Process Analyst Views in a shared
location. Whenever a load operation occurs from either of these locations, the
loaded file will be synchronized with each location, such that the latest version
of the file appears in both locations.
See Also IProcessAnalyst.LoadFromFile [Method],
IProcessAnalyst.PrimaryPath [Property][Get/Set],
IProcessAnalyst.SaveToFile [Method]
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim path As String
‘Retrieve the path
path = myPage_AN35.PrimaryPath
‘Set the path
myPage_AN35.SecondaryPath = “\\computer1\PA Views”
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
STRING path;
// Retrieve the path
216
IProcessAnalyst.Toolba Gets a reference to the Toolbars collection. With this object you can browse and
rs [Property][Get] modify existing toolbars.
Defined As
[VBA] Object Toolbars
[Cicode] OBJECT Toolbars
[C++] IToolbars* Toolbars
Execution Result
If the property get succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim toolbars As Object
‘Retrieve the toolbars collection
Set toolbars = myPage_AN35.Toolbars
End Sub
[Cicode]
FUNCTION Example()
OBJECT hProcessAnalyst = ObjectByName(“AN35”);
OBJECT toolbars;
// Retrieve the toolbars collection
toolbars = _ObjectGetProperty(hProcessAnalyst, “Toolbars”);
END
IProcessAnalyst.WriteP Returns the privilege level required to save Process Analyst views to the
rivilegeLevel Primary and Secondary paths.
[Property][Get] Defined As
[VBA] Integer WritePrivilegeLevel
[Cicode] INT WritePrivilegeLevel
[C++] short WritePrivilegeLevel
Execution Result
If the property get succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument.
Remarks
The privilege cannot be set via automation. It must be set in the property pages
at design time (for example, in Graphics Builder).
217
IProcessAnalyst.Zoom Enables or disables the box zooming mode for the Process Analyst.
Mode [Property][Get/ Defined As
Set]
[VBA] Boolean ZoomMode
[Cicode] INT ZoomMode
[C++] VARIANT_BOOL ZoomMode
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument.
Remarks
Setting this mode will ensure only box zooming operations can occur; all other
operations such as interactive scrolling and scaling will cease.
Limits
True (-1): Enable zoom mode.
False (0): Disable zoom mode.
Calling Syntax
Assumes you have a page called “myPage” and the Process Analyst has been
named “AN35”.
[VBA]
Sub Example()
Dim zoomMode As Boolean
‘Retrieve the mode
zoomMode = myPage_AN35.ZoomMode
218
MouseDoubleClick This event is raised whenever a mouse double-click occurs on the graphical
[Event] chart area of the Process Analyst.
Defined As
[VBA] MouseDoubleClick(pen As Object, button As Integer)
[Cicode] MouseDoubleClick(OBJECT processAnalyst, OBJECT pen, INT
button)
[C++] MouseDoubleClick(IPen pen, int button)
Parameters
pen
[in] Indicates which pen the double-click occurred on. This object will be
invalid if no pen was double-clicked.
button
[in] Indicates which button was double-clicked: 0 = Left, 1 = Right.
processAnalyst
[in] Indicates the Process Analyst object that raised the event (Cicode only).
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_MouseDoubleClick(pen As Object, button As Integer)
End Sub
[Cicode]
FUNCTION myPage_AN35_MouseDoubleClick(OBJECT processAnalyst, OBJECT pen, INT button)
END
MouseClick [Event] This event is raised whenever a single mouse click occurs on the graphical chart
area of the Process Analyst.
Defined As
[VBA] MouseClick(pen As Object, button As Integer)
[Cicode] MouseClick(OBJECT processAnalyst, OBJECT pen, INT button)
219
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_MouseClick(pen As Object, button As Integer)
End Sub
[Cicode]
FUNCTION myPage_AN35_MouseClick(OBJECT processAnalyst, OBJECT pen, INT button)
END
PenCreated [Event] This event is raised whenever a pen is either created via the automation model,
or added through the Add Pen dialog at run time.
Defined As
[VBA] PenCreated(pen As Object)
[Cicode] PenCreated(OBJECT processAnalyst, OBJECT pen)
[C++] PenCreated(IPen* pen)
Parameters
pen
[in] Refers to the pen that was created.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only).
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_PenCreated(pen As Object)
End Sub
[Cicode]
FUNCTION myPage_AN35_PenCreated(OBJECT processAnalyst, OBJECT pen)
END
220
PenDeleted [Event] This event is raised whenever a pen is deleted either by automation or via the
interface.
Defined As
[VBA] PenDeleted(penName As String)
[Cicode] PenDeleted(OBJECT processAnalyst, STRING penName)
[C++] PenDeleted(BSTR penName)
Parameters
penName
[in] Contains the name of the pen that was deleted.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only)
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35
[VBA]
Sub myPage_AN35_PenDeleted(penName As String)
End Sub
[Cicode]
FUNCTION myPage_AN35_PenDeleted(OBJECT processAnalyst, STRING penName)
END
PenRenamed [Event] This event is raised whenever a pen is renamed via automation or through the
user interface.
Defined As
[VBA] PenRenamed(pen As Object)
[Cicode] PenRenamed(OBJECT processAnalyst, OBJECT pen)
[C++] PenRenamed(IPen* pen)
Parameters
pen
[in] Refers to the pen that was renamed.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only).
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
221
[VBA]
Sub myPage_AN35_PenRenamed(pen As Object)
End Sub
[Cicode]
FUNCTION myPage_AN35_PenRenamed(OBJECT processAnalyst, OBJECT pen)
END
PenSelectionChanged This event is raised whenever the selection changes in the Process Analyst.
[Event] Defined As
[VBA] PenSelectionChanged (pen As Object)
[Cicode] PenSelectionChanged (OBJECT processAnalyst, OBJECT pen)
[C++] PenSelectionChanged (IPen* pen)
Parameters
pen
[in] Refers to the pen that now has primary selection. This maybe invalid if
the last pen was deleted from the view.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only)
Remarks
Selection can change via user interaction (such as clicking on pens, deleting/
adding pens) and automation.
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_PenSelectionChanged(pen As Object)
End Sub
[Cicode]
FUNCTION myPage_AN35_PenSelectionChanged(OBJECT processAnalyst, OBJECT pen)
END
HorizontalAxisChanged This event is raised when the date/time axis position or scale of a pen is changed.
[Event] Defined As
[VBA] HorizontalAxisChanged(pen As Object)
[Cicode] HorizontalAxisChanged(OBJECT processAnalyst, OBJECT pen)
[C++] HorizontalAxisChanged(IPen* pen)
Parameters
pen
222
[in] Refers to the pen that has changed. This will be invalid if pens are
locked.
processAnalyst
[in] Indicates the Process Analyst object that raised the event (Cicode only).
Remarks
When the LockedPens property is True, this event is fired only once with the
pen parameter marked as invalid.
See Also IProcessAnalyst.LockedPens [Property][Get/Set],
VerticalAxisChanged [Event]
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
AN35_E.
[VBA]
Sub AN35_E_HorizontalAxisChanged (pen As Object)
End Sub
[Cicode]
FUNCTION AN35_E_HorizontalAxisChanged (OBJECT processAnalyst, OBJECT pen)
END
VerticalAxisChanged This event is raised whenever the vertical axis position or scale of a pen is
[Event] changed.
Defined As
[VBA] VerticalAxisChanged(pen As Object)
[Cicode] VerticalAxisChanged(OBJECT processAnalyst, OBJECT pen)
[C++] VerticalAxisChanged(IPen* pen)
Parameters
pen
[in] Refers to the pen that has changed.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only)
See Also HorizontalAxisChanged [Event]
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_VerticalAxisChanged (pen As Object)
End Sub
223
[Cicode]
FUNCTION myPage_AN35_VerticalAxisChanged (OBJECT processAnalyst, OBJECT pen)
END
CursorMoved [Event] This event is raised whenever the cursor position changes.
Defined As
[VBA] CursorMoved(cursor As Object, position As Integer)
[Cicode] CursorMoved (OBJECT processAnalyst, OBJECT cursor, INT
position)
[C++] CursorMoved (IPen* pen, int position)
Parameters
cursor
[in] Refers to the cursor that has moved.
position
[in] Indicates the new position of the cursor.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only).
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_CursorMoved(pen As Object, position As Integer)
End Sub
[Cicode]
FUNCTION myPage_AN35_CursorMoved(OBJECT processAnalyst, OBJECT cursor, INT position)
END
Error [Event] This event is raised whenever an error is generated from the Process Analyst.
Defined As
[VBA] Error(errorCode As Integer, errorMessage As String)
[Cicode] Error(OBJECT processAnalyst, INT errorCode, STRING
errorMessage)
[C++] Error(ErrorNotifyCode errorCode, BSTR errorMessage)
Parameters
errorCode
[in] Indicates the error that occurred. See the ErrorNotifyCode
enumeration.
errorMessage
[in] Contains the message associated with the error code.
224
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only)
See Also ErrorNotifyCode [Enumeration]
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_Error(errorCode As Integer, errorMessage As String)
End Sub
[Cicode]
FUNCTION myPage_AN35_Error(OBJECT processAnalyst, INT errorCode, STRING errorMessage)
END
PropertyChanged This event is raised whenever a property that has been subscribed to has
[Event] changed.
Defined As
[VBA] PropertyChanged(interfaceName As String, propertyName As
String)
[Cicode] PropertyChanged (OBJECT processAnalyst, STRING
interfaceName, STRING propertyName)
[C++] PropertyChanged (BSTR interfaceName, BSTR propertyName)
Parameters
interfaceName
[in] Indicates which interface the property which has changed belongs to.
propertyName
[in] Indicates which property has changed.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only)
Remarks
For this event to be raised you must subscribe to one or more properties.
See Also IProcessAnalyst.SubscribeForPropertyChange [Method],
IProcessAnalyst.UnsubscribePropertyChange [Method]
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_PropertyChanged(interfaceName As String, propertyName As String)
End Sub
225
[Cicode]
FUNCTION myPage_AN35_PropertyChanged(OBJECT processAnalyst, STRING interfaceName, STRING
propertyName)
END
OVItemAdded [Event] This event is raised whenever an item is added to the ObjectView.
Defined As
[VBA] OVItemAdded(item As Object)
[Cicode] OVItemAdded (OBJECT processAnalyst, OBJECT item)
[C++] OVItemAdded (IObjectViewItem* item)
Parameters
item
[in] A reference to the item that was added to the ObjectView.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only)
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_OVItemAdded(item As Object)
End Sub
[Cicode]
FUNCTION myPage_AN35_OVItemAdded(OBJECT processAnalyst, OBJECT item)
END
[VBA]
Sub myPage_AN35_OVItemRemoved(item As Object)
End Sub
[Cicode]
FUNCTION myPage_AN35_OVItemRemoved(OBJECT processAnalyst, OBJECT
item)
END
OVItemSelected [Event] This event is raised whenever an item is selected in the ObjectView.
Defined As
[VBA] OVItemSelected(item As Object)
[Cicode] OVItemSelected(OBJECT processAnalyst, OBJECT item)
[C++] OVItemSelected(IObjectViewItem* item)
Parameters
item
[in] A reference to the item that was selected in the ObjectView.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only)
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_OVItemSelected(item As Object)
End Sub
[Cicode]
FUNCTION myPage_AN35_OVItemSelected(OBJECT processAnalyst, OBJECT item)
END
OVItemChecked [Event] This event is raised whenever an item is checked in the ObjectView.
Defined As
[VBA] OVItemChecked(item As Object)
[Cicode] OVItemChecked(OBJECT processAnalyst, OBJECT item)
[C++] OVItemChecked(IObjectViewItem* item)
Parameters
item
[in] A reference to the item that was checked in the ObjectView.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only)
227
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_OVItemChecked(item As Object)
End Sub
[Cicode]
FUNCTION myPage_AN35_OVItemChecked(OBJECT processAnalyst, OBJECT item)
END
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only)
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_OVColumnRemoved(name As String)
End Sub
[Cicode]
FUNCTION myPage_AN35_OVColumnRemoved(OBJECT processAnalyst, STRING name)
END
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_CommandExecuted(commandId As String)
End Sub
[Cicode]
FUNCTION myPage_AN35_CommandExecuted(OBJECT processAnalyst, STRING commandId)
END
229
UpdateCommand This event is raised whenever the Process Analyst needs to refresh the state of its
[Event] toolbars.
Defined As
[VBA] UpdateCommand(commandId As String)
[Cicode] UpdateCommand(OBJECT processAnalyst, STRING commandId)
[C++] UpdateCommand(BSTR commandId)
Parameters
commandId
[in] Contains the unique identifier of the command that needs to be
refreshed.
processAnalyst
[in] Indicates the Process Analyst object which raised the event. (Cicode
only)
Remarks
This event is only raised for custom commands. You should use this event as an
opportunity to update the enable and/or the pressed state of the toolbar button
associated with the command.
This event will be raised frequently so you should limit the amount of code
executed in response to this event.
An Update will be triggered in at least the following scenarios:
Selection changes
Command execution
Calling Syntax
Assumes you have a Process Analyst on a page with an event class defined as
myPage_AN35.
[VBA]
Sub myPage_AN35_UpdateCommand(commandId As Integer)
End Sub
[Cicode]
FUNCTION myPage_AN35_UpdateCommand(OBJECT processAnalyst, INT commandId)
END
Members
Member Name Description Value
AlarmType_Digital The tag is digital alarm 0
AlarmType_Analog The tag is an analog alarm 1
AlarmType_Advanced The tag is an advanced alarm 2
AlarmType_TimeStamped The tag is a time-stamped alarm 3
AlarmType_MultiDigital The tag is a multi-digital alarm 4
AlarmType_ArgyleAnalog The tag is a legacy Argyle analog alarm 5
AlarmType_TimeStampedDigital The tag is a digital time-stamped alarm 6
AlarmType_TimeStampedAnalog The tag is a analog time-stamped alarm 7
See Also IAlarmPen.AlarmType [Property][Get/Set]
AxisLabelType Specifies how the labels are drawn on the vertical axis.
[Enumeration] Defined As
[VBA] Integer
[Cicode] INT
[C++] AxisLabelType
Members
Member Name Description Value
AxisLabelType_NONE No labels will be visible on axis 0
AxisLabelType_DOUBLE Displays in decimal format 1
AxisLabelType_INTEGER Displays in integer format 2
AxisLabelType_PERCENT Displays as “%” 3
AxisLabelType_AMPS Displays as “A” 4
AxisLabelType_DEGREES Displays as “deg” 5
AxisLabelType_FEET Displays as “ft” 6
AxisLabelType_FEETPERMIN Displays as “ft/min” 7
AxisLabelType_FEETPERSEC Displays as “ft/s” 8
AxisLabelType_GALLONS Displays as “gal” 9
AxisLabelType_GALLONSPERHR Displays as “gal/h” 10
AxisLabelType_GALLONSPERMIN Displays as “gal/min” 11
AxisLabelType_GALLONSPERSEC Displays as “gal/s” 12
AxisLabelType_HERTZ Displays as “Hz” 13
AxisLabelType_KILOGRAMS Displays as “kg” 14
AxisLabelType_KILOGRAMSPERHR Displays as “kg/h” 15
AxisLabelType_KILOGRAMSPERMIN Displays as “kg/min” 16
AxisLabelType_KILOGRAMSPERSEC Displays as “kg/s” 17
AxisLabelType_KILOMETRESPERHR Displays as “kg/h” 18
AxisLabelType_KILOPASCALS Displays as “kPa” 19
AxisLabelType_KILOWATTS Displays as “kW” 20
AxisLabelType_LITRES Displays as “l” 21
AxisLabelType_LITRESPERHR Displays as “l/h” 22
AxisLabelType_LITRESPERMIN Displays as “l/min” 23
AxisLabelType_LITRESPERSEC Displays as “l/s” 24
231
PenNameMode Defines how the pen name will be generated. It is used in conjunction with the
[Enumeration] IPens.Create method.
Defined As
[VBA] Integer
[Cicode] INT
[C++] PenNameMode
Members
Member Name Description Value
PenNameMode_Comment The comment field obtained from the Vijeo Citect trend/alarm tag 1
will be used as the pen name.
PenNameMode_Tag The value of the IPen.DataPoint property will be used as the pen 2
name.
PenNameMode_Custom Indicates that you will be setting the name using the IPen.Name 3
property.
See Also IPens.Create [Method], IPen.DataPoint [Property][Get/Set],
IPen.Name [Property][Get/Set]
LineType [Enumeration] Defines the visual representation of the lines between samples of an analog pen.
Defined As
[VBA] Integer
234
[Cicode] INT
[C++] LineType
Members
Member Name Description Value
LineType_STRAIGHT A single line is drawn from point A to point B. 0
LineType_STEPPED The line drawn will maintain the value of the previous sample. When the 1
samples differ, a vertical line will be drawn to the new sample value.
See Also IAnalogPen.LineInterpolation [Property][Get/Set]
FileLocation Specifies the location to save and write Process Analyst views to.
[Enumeration] Defined As
[VBA] Integer
[Cicode] INT
[C++] FileLocation
Members
Member Name Description Value
FileLocation_Local Refers to the project folder 0
FileLocation_Server Refers to the both the primary/standby server paths 1
FileLocation_User Refers to the My Documents folder 2
See Also IProcessAnalyst.LoadFromFile [Method], IProcessAnalyst.SaveToFile
[Method]
IToolbar Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IToolbar
236
Methods (0)
Properties (2)
IToolbar.Visible [Property][Get/Set]
IToolbar.Buttons [Property][Get]
IToolbars Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IToolbar
Methods (0)
Properties (3)
IToolbars.Count [Property][Get]
IToolbars.Item [Property][Get]
IToolbars._NewEnum [Property][Get]
IToolbarButton Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IToolbar
Methods (0)
Properties (1)
IToolbarButton.CommandId [Property][Get]
IToolbarButtons Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] IToolbar
Methods (3)
IToolbarButtons.Add [Method]
IToolbarButtons.Remove [Method]
IToolbarButtons.RemoveAll [Method]
Properties (3)
IToolbarButtons.Count [Property][Get]
IToolbarButtons.Item [Property][Get]
IToolbarButtons._NewEnum [Property][Get]
IToolbarButtons.Add Adds a toolbar button linked to the command identified by the supplied
[Method] Command Id to this Toolbar.
Defined As
[VBA] Add(CommandId as String)
[Cicode] Add (STRING CommandId)
[C++] HRESULT Add (BSTR CommandId)
Parameters
CommandId
[in] The Command ID of a command to link to the new button that is being
added.
Execution Result
If this method succeeds, the return value will be Success. If the command ID is
invalid, the return value will be InvalidArgument.
Remarks
If this method succeeds, the ID supplied will be linked to the new button that is
added. The Commands properties will be applied to that button. (its icon,
tooltip, security) If this button is pressed, the CommandExecuted event will
raise with this Command ID.
See Also CommandExecuted [Event]
Calling Syntax
This example assumes there is a valid ToolbarButtons collection as retrieved
from an ObjectView (e.g., VBA: objectView.Toolbars.Item(1).Buttons).
[VBA]
Sub Example(Buttons As Object)
Buttons.Add(“Citect_Command_Help”)
End Sub
241
[Cicode]
FUNCTION Example(OBJECT hButtons)
_ObjectCallMethod(hButtons, “Add”, “Citect_Command_Help”);
END
Execution Results
If the method succeeds, the return value will be Success. If the index is out of
range, the return value will be InvalidRange. If the method fails, the return value
will be GeneralFailure.
Calling Syntax
This example assumes there is a valid ToolbarButtons collection as retrieved
from an ObjectView. (e.g., VBA: objectView.Toolbars.Item(1).Buttons).
[VBA]
Sub Example(Buttons As Object)
Buttons.Remove(1)
End Sub
[Cicode]
FUNCTION Example(OBJECT hButtons)
_ObjectCallMethod(hButtons, “Remove”, 1);
END
[VBA]
Sub Example(Buttons As Object)
Buttons.RemoveAll()
End Sub
[Cicode]
FUNCTION Example(OBJECT hButtons)
_ObjectCallMethod(hButtons, “RemoveAll”);
END
Calling Syntax
This example assumes there is a valid ToolbarButtons collection as retrieved
from an ObjectView (e.g., VBA: objectView.Toolbars.Item(1).Buttons).
[VBA]
Sub Example(Buttons As Object)
Dim toolbar As Object
‘Getting Property value
Set toolbar = Buttons.Item(1)
End Sub
[Cicode]
FUNCTION Example(OBJECT hButtons)
// Getting property value
OBJECT hToolbar = _ObjectCallMethod(hButtons, "get_Item", 1);
END
ITrendCursor Interface
Defined As
[VBA] Object
[Cicode] OBJECT
[C++] ITrendCursor
Methods
ITrendCursor.GetValue [Method]
ITrendCursor.Delete [Method]
Properties
ITrendCursor.Color [Property][Get/Set]
ITrendCursor.Width [Property][Get/Set]
ITrendCursor.Position [Property][Get/Set]
ITrendCursor.Visible [Property][Get/Set]
ITrendCursor.Collection [Property][Get]
ITrendCursor.Name [Property][Get/Set]
244
ITrendCursor.PenLabelVisible [Property][Get/Set]
ITrendCursor.PenLabelWidth [Property][Get/Set]
ITrendCursor.PenLabelHeight [Property][Get/Set]
ITrendCursor.PenLabelX [Property][Get/Set]
ITrendCursor.PenLabelY [Property][Get/Set]
ITrendCursor.LabelsLocked [Property][Get/Set]
ITrendCursor.GetValue Gets the value at the cursor for the given pen.
[Method] Defined As
[VBA] GetValue(pen As Object, asLocal As Boolean, time As Date, milli As
Integer, value As String)
[Cicode] GetValue(OBJECT pen, INT asLocal, REAL time, INT milli,
STRING value)
[C++] HRESULT Create GetValue(IPen* pen, VARIANT_BOOL asLocal,
DATE *time, short *milli, BSTR *value)
Parameters
pen
[in] The pen for which the value is required.
asLocal
[in] Set to True (-1) if returned time is required in Local form (False (0) for
UTC).
time
[out] The time represented by the cursor position. This is accurate to one
second and must be combined with milli to give millisecond accuracy.
milli
[out] Added to time (see above) to give cursor time in millisecond
accuracy.
value
[out] The value of the trend for the given pen at the returned time.
Execution Result
If the function succeeds, the return value will be Success. If one of the return
variables are bad, then the return value will be InvalidArgument. If the cursor is
deleted, the return value will be GeneralFailure.
Calling Syntax
This example assumes you have a valid reference to a cursor and a pen.
[VBA]
Sub Example(cursor As Object, pen As Object)
Dim asLocal As Boolean
Dim cursorTime As Date
Dim milli As Integer
Dim cursorValue As String
245
asLocal = 0
cursor.GetValue pen, asLocal, cursorTime, milli, cursorValue
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursor, OBJECT hPen)
INT asLocal = 0;
REAL time;
INT milli;
STRING value;
_ObjectCallMethod(hCursor , "GetValue", hPen, asLocal, time, milli, value);
END
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the cursor is
deleted the return value will be GeneralFailure.
Remarks
The Cicode function PackedRGB can be used to convert an RGB color
specification to the OLE_COLOR type used by the Process Analyst.
Calling Syntax
This example assumes you have a valid reference to a cursor.
[VBA]
Sub Example(cursor As Object)
Dim trendCursorColor As Long
‘Getting Property value
trendCursorColor = cursor.Color
‘Setting Property value (to red)
cursor.Color = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursor)
INT trendCursorColor;
// Getting current property value
trendCursorColor = _ObjectGetProperty(hCursor, “Color”);
// Setting Property to blue
_ObjectSetProperty(hCursor, “Color”, PackedRGB(0, 0, 255));
END
lineWidth = cursor.Width
‘Setting Property value
cursor.Width = 5
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursor)
INT lineWidth;
// Getting current property value
lineWidth = _ObjectGetProperty(hCursor, “Width”);
// Setting Property to 5
_ObjectSetProperty(hCursor, “Width”, 5);
END
ITrendCursor.Position Get or Set the cursor’s physical position in the Process Analyst.
[Property][Get/Set] Defined As
[VBA] Long Position
[Cicode] INT Position
[C++] int Position
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the cursor is
deleted, the return value will be GeneralFailure.
Remarks
The cursor position is measured as the number of pixels from the left of the
Process Analyst graph.
Calling Syntax
This example assumes you have a valid reference to a cursor.
[VBA]
Sub Example(cursor As Object)
Dim position As Integer
‘Getting Property value
position = cursor.Position
‘Setting Property value
cursor.Position = 300
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursor)
INT position;
// Getting current property value
position = _ObjectGetProperty(hCursor, “Position”);
// Setting Property to (300)
_ObjectSetProperty(hCursor, “Position”, 300);
END
ITrendCursor.Collection Obtain a reference to the ICursors collection that contains the cursor.
[Property][Get] Defined As
[VBA] Object Collection
[Cicode] OBJECT Collection
[C++] HRESULT Collection(ICursors **cursor)
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the cursor is
deleted, the return value will be GeneralFailure.
Calling Syntax
This example assumes you have a valid reference to a cursor.
249
[VBA]
Sub Example(cursor As Object)
Dim cursors As Object
‘Getting Property collection
Set cursors = cursor.Collection
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursor)
OBJECT hCursors;
// Getting collection
hCursors = _ObjectGetProperty(hCursor, “Collection”);
END
ITrendCursor.PenLabel Get or Set the label visibility of the specified pen on this cursor.
Visible [Property][Get/ Defined As
Set]
[VBA] Boolean PenLabelVisible(pen As Object)
[Cicode] INT PenLabelVisible(OBJECT pen)
[C++] HRESULT PenLabelVisible(IPen* pen, VARIANT_BOOL labelVisible)
Parameters
pen
[in] The pen for which cursor label is to be referenced.
Execution Result
If the property get/set succeeds, the return value will be Success. If the return
variable is bad, the return value will be InvalidArgument. If the cursor is
deleted, the return value will be GeneralFailure.
Limits
True (-1): Label is visible.
False (0): Label is hidden.
Remarks
Setting the visibility of the cursor using the Visible property will override the
pen label visibility. For example, if a particular label is hidden using
PenLabelVisible, this label will be shown again if Visible is set to True (-1).
See Also ITrendCursor.Visible [Property][Get/Set]
Calling Syntax
This example assumes you have a valid reference to a cursor and a pen.
[VBA]
Sub Example(cursor As Object, pen As Object)
Dim labelVisible As Boolean
‘Getting Property value
labelVisible = cursor.PenLabelVisible(pen)
‘Setting Property value (False)
cursor.PenLabelVisible(pen) = False
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursor, OBJECT hPen)
INT labelVisible;
// Getting current property value
labelVisible = _ObjectCallMethod(hCursor,
"get_PenLabelVisible", hPen);
// Setting Property to FALSE
_ObjectCallMethod(hCursor , "put_PenLabelVisible", hPen, 0);
END
251
ITrendCursor.PenLabel Get or Set the label width of the specified pen on this cursor.
Width [Property][Get/ Defined As
Set]
[VBA] Double PenLabelWidth(pen As Object)
[Cicode] REAL PenLabelWidth (OBJECT pen)
[C++] HRESULT PenLabelWidth (IPen* pen, double labelWidth)
Parameters
pen
[in] The pen for which cursor label is to be referenced.
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the cursor is
deleted the return value will be GeneralFailure.
Remarks
The value of width is represented in pixels.
See Also ITrendCursor.PenLabelHeight [Property][Get/Set],
ITrendCursor.PenLabelX [Property][Get/Set], ITrendCursor.PenLabelY
[Property][Get/Set]
Calling Syntax
This example assumes you have a valid reference to a cursor and a pen.
[VBA]
Sub Example(cursor As Object, pen As Object)
Dim labelWidth As Double
‘Getting Property value
labelWidth = cursor.PenLabelWidth(pen)
‘Setting Property value (100)
cursor.PenLabelWidth(pen) = 100
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursor, OBJECT hPen)
REAL labelWidth;
// Getting current property value
labelWidth = _ObjectCallMethod(hCursor , "get_PenLabelWidth", hPen);
// Setting Property to 100
_ObjectCallMethod(hCursor , "put_PenLabelWidth", hPen, 100);
END
ITrendCursor.PenLabel Get or Set the label height of the specified pen on this cursor.
Height [Property][Get/ Defined As
Set]
[VBA] Double PenLabelHeight(pen As Object)
[Cicode] REAL PenLabelHeight (OBJECT pen)
[C++] HRESULT PenLabelHeight (IPen* pen, double labelHeight)
Parameters
252
pen
[in] The pen for which cursor label is to be referenced.
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the cursor is
deleted the return value will be GeneralFailure.
Remarks
The value of height is represented in pixels.
See Also ITrendCursor.PenLabelWidth [Property][Get/Set],
ITrendCursor.PenLabelX [Property][Get/Set], ITrendCursor.PenLabelY
[Property][Get/Set]
Calling Syntax
This example assumes you have a valid reference to a cursor and a pen.
[VBA]
Sub Example(cursor As Object, pen As Object)
Dim labelHeight As Double
‘Getting Property value
labelHeight = cursor.PenLabelHeight(pen)
‘Setting Property value (100)
cursor.PenLabelHeight (pen) = 100
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursor, OBJECT hPen)
REAL labelHeight;
// Getting current property value
labelHeight = _ObjectCallMethod(hCursor , "get_PenLabelHeight", hPen);
// Setting Property to 100
_ObjectCallMethod(hCursor , "put_PenLabelHeight", hPen, 100);
END
ITrendCursor.PenLabel Get or Set the label’s X-Axis position of the specified pen on this cursor.
X [Property][Get/Set] Defined As
[VBA] Double PenLabelX(pen As Object)
[Cicode] REAL PenLabelX (OBJECT pen)
[C++] HRESULT PenLabelX (IPen* pen, double labelX)
Parameters
pen
[in] The pen for which cursor label is to be referenced.
Execution Result
If the property get/set succeeds the return value will be Success. If the return
variable is bad then the return value will be InvalidArgument. If the cursor is
deleted the return value will be GeneralFailure.
253
Remarks
The label position is represented in pixels.
See Also ITrendCursor.PenLabelWidth [Property][Get/Set],
ITrendCursor.PenLabelHeight [Property][Get/Set],
ITrendCursor.PenLabelY [Property][Get/Set]
Calling Syntax
This example assumes you have a valid reference to a cursor and a pen.
[VBA]
Sub Example(cursor As Object, pen As Object)
Dim labelX As Double
‘Getting Property value
labelX = cursor.PenLabelX(pen)
‘Setting Property value (100)
cursor.PenLabelX(pen) = 100
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursor, OBJECT hPen)
REAL labelX;
// Getting current property value
labelX = _ObjectCallMethod(hCursor , "get_PenLabelX", hPen);
// Setting Property to 100
_ObjectCallMethod(hCursor , "put_PenLabelX", hPen, 100);
END
ITrendCursor.PenLabel Get or Set the label’s Y-Axis position of the specified pen on this cursor.
Y [Property][Get/Set] Defined As
[VBA] Double PenLabelY(pen As Object)
[Cicode] REAL PenLabelY (OBJECT pen)
[C++] HRESULT PenLabelY (IPen* pIPen, double labelY)
Remarks
The label position is represented in pixels
[Cicode]
FUNCTION Example(OBJECT hCursor, OBJECT hPen)
REAL labelY;
// Getting current property value
labelY = _ObjectCallMethod(hCursor , "get_PenLabelY", hPen);
// Setting Property to 100
_ObjectCallMethod(hCursor , "put_PenLabelY", hPen, 100);
END
ITrendCursor.LabelsLo Get or Set whether the cursor label positions are locked.
cked [Property][Get/Set] Defined As
[VBA] Boolean LabelsLocked
[Cicode] INT LabelsLocked
[C++] VARIANT_BOOL LabelsLocked
Limits
True (-1): Labels are locked
False (0): Labels are unlocked
Remarks
If labels are locked, they will not move when the cursor position is changed.
Calling Syntax
This example assumes you have a valid reference to a cursor.
[VBA]
Sub Example(cursor As Object)
Dim labelsLocked As Boolean
‘Getting Property value
labelsLocked = cursor.LabelsLocked
‘Setting Property value (False)
cursor.LabelsLocked = False
End Sub
[Cicode]
FUNCTION Example(OBJECT hCursor)
INT labelsLocked;
// Getting current property value
labelsLocked = _ObjectGetProperty(hCursor, “LabelsLocked”);
// Setting Property to False (0)
_ObjectSetProperty(hCursor, “LabelsLocked”, 0);
END
Chapter 13: Cicode Programming Reference
Automation Examples
The best way of understanding how to use the Process Analyst’s automation
model is to see some example code. The following examples cover the most
important concepts of extensibility offered by the Process Analyst:
Event handling
Enumerating collections
Custom commands
Custom columns
All of the samples assume you are using the CSV example project and have
pasted a new Process Analyst onto the test page provided by the project.
You will also need to configure the Process Analyst object’s Name and Event
class by doing the following:
1 In the CSV example project open the “test” page in Graphics Builder
2 Click the Process Analyst icon in the toolbox to insert the control.
3 Resize the control to fit the test page.
4 Double-click the Process Analyst.
5 Click the Access/Identification tab.
6 Change the Object Name to CPA.
7 Change the Event class to CPA_E.
8 Click Apply and OK.
Handling an Event The Process Analyst contains many events that are triggered when certain
actions occur. See “Events”.
To handle an event you must provide a handler for the event by prepending
your Process Analyst’s event class name with the event name you want to
handle and an underscore. To configure the event class, see “Automation
Examples”.
The example below shows how to define a handler for the “MouseClick” event
with an event class defined as “CPA_E”.
[VBA]
Sub CPA_E_MouseClick(pen As Object, button As Integer)
End Sub
[Cicode]
FUNCTION CPA_E_MouseClick(OBJECT hPA, OBJECT hPen, INT button)
END
The following example uses the MouseClick event to cancel the box zoom
operation when the right mouse button is clicked.
256
Note: When referring to an ActiveX object in VBA, you need to prepend it with
the page name and an underscore. In the example below, the page name is called
“test”. The object name is “CPA” and the event class name is “CPA_E”.
[VBA]
Sub CPA_MouseClick(pen As Object, button As Integer)
Dim bZoomMode As Boolean
If (button = 1) Then
bZoomMode = test_CPA.ZoomMode
Enumerating The Process Analyst contains many “collections” such as Panes, Pens, Cursors,
collections Commands, and so on. This example shows you how to enumerate through the
buttons on the navigation toolbar.
[VBA]
Sub EnumerateToolbarButtons()
Dim navBar As Object
Dim iButton As Integer
Dim button As Object
Dim nButtons As Integer
OBJECT hButton;
INT nButtons;
INT iButton;
IF (ObjectIsValid(hNavBar)) THEN
hButtons = _ObjectGetProperty(hNavBar, "Buttons");
nButtons = _ObjectGetProperty(hButtons, "Count");
Implementing a custom Custom commands are easy to implement and involve creating a new
command command, adding it to a toolbar, and responding to the CommandExecuted
event.
To add a new command and add it to the toolbar as a button:
1 Display the properties for your Process Analyst in the Graphics Builder
2 See Adding New Commands.
3 Use the following settings:
ID =“SelectedPen”
Tooltip = “Show the name of the selected pen”
Button style = <Push>
Enabled = <Checked>
Once you’ve done this, you need to write an event handler for the
CommandExecuted event. This event will be called when the command is
executed, whether by Cicode or by clicking on the respective toolbar button.
The CommandExecuted event when triggered has a commandId parameter
identifying the command executed by the operator.
This example implements a command that displays a message box showing the
name of the primary selected pen.
See Also “CommandExecuted [Event]”
[VBA]
Sub CPA_E_CommandExecuted(commandId As String)
Select Case commandId
Case "SelectedPen"
Call OnSelectedPen()
End Select
End Sub
Sub OnSelectedPen()
Dim pen As Object
Dim sName As String
258
[Cicode]
FUNCTION CPA_E_CommandExecuted(OBJECT hPA, STRING commandId)
SELECT CASE commandId
CASE "SelectedPen"
OnSelectedPen(hPA);
END SELECT
END
IF ObjectIsValid(hPen) THEN
sName = _ObjectGetProperty(hPen, "Name");
END
sMessage = "The name of the selected pen is:^n" + sName;
Message("Citect", sMessage, 48);
END
END
Sub OnUpdatedSelectedPen()
Dim pen As Object
Dim command As Object
Dim sName As String
sName = pen.Name
command.Enabled = True
Exit Sub
errHandler:
command.Enabled = False
End Sub
[Cicode]
FUNCTION CPA_E_UpdateCommand(OBJECT hPA, STRING commandId)
SELECT CASE commandId
CASE "PaneLock"
OnUpdatePaneLock(hPA);
CASE "SelectedPen"
OnUpdateSelectedPen(hPA);
END SELECT
END
ErrSet(1);
_ObjectGetProperty(hPen, "Name");
iError = IsError();
Implementing a custom Custom columns are added to the Object View allowing you to display your
column own information associated with a pen.
The sample below implements a column that calculates the “Display Period” for
each pen on the Process Analyst. The sample consists of three functions: an
update function and two event handlers to ensure the column is updated when
new pens are added and when the time span is changed.
The code achieves this by iterating through each pane and pen object in the
Process Analyst while simultaneously keeping a running index count of which
pane/pen item it matches up to in the Object View tree.
By using these indexes the code knows which row to update. A row update is
achieved using the PutField method.
Note: Implementing your own column is CPU-intensive. Try to keep the amount
of code required to calculate a row value as efficient as possible and be aware
how often the code will be executed. Note also that, for efficiency, the
BlockUpdates and UnblockUpdates functions are used to limit the number of
updates made to the Object View.
Event Handlers
Once you have a function that implements your custom column, you need to
know when to update that column. The most common method of doing this is to
implement event handlers for particular Process Analyst events. The example
below uses the PenCreated event and the HorizontalAxisChanged event.
These events will ensure that the column values will be updated when pens are
added to the display and when the time span changes.
See Also “IObjectViewItem.PutField [Method]”, “IProcessAnalyst.BlockUpdates
[Method]”, “IProcessAnalyst.UnBlockUpdates [Method]”, “PenCreated
[Event]”, “HorizontalAxisChanged [Event]”
[VBA]
Sub UpdateMyColumn()
Dim iPaneItem As Integer
Dim iPane As Integer
Dim nPanes As Integer
Dim nSamples As Integer
nSamples = test_CPA.NumberOfSamples
iPaneItem = 0
nPanes = test_CPA.Panes.Count
For iPane = 1 To nPanes
Dim pane As Object
iPaneItem = iPaneItem + 1
test_CPA.BlockUpdates
iPenItem = 0
nPens = pane.Pens.Count
For iPen = 1 To nPens
261
iPenItem = iPenItem + 1
[Cicode]
FUNCTION UpdateMyColumn()
OBJECThPA = ObjectByName("CPA");
OBJECThPanes = _ObjectGetProperty(hPA, "Panes");
OBJECThPane;
OBJECThPens;
OBJECThPen;
OBJECThObjectView = _ObjectGetProperty(hPA, "ObjectView");
OBJECThPaneItems = _OBJECTGetProperty(hObjectView, "Items");
OBJECThPaneItem;
OBJECThPenItems;
OBJECThPenItem;
INT nPens;
INT iPen;
INT iPane = 0;
INT nSamples = _ObjectGetProperty(hPA, "NumberOfsamples");
INT iPenItem = 0;
INT iPaneItem = 0;
REAL dDiff;
REAL dtStart;
REAL dtEnd;
INT dtStartMs;
INT dtEndMs;
STRINGsText;
IF ObjectIsValid(hPane) THEN
hPens = _ObjectGetProperty(hPane, "Pens");
nPens = _ObjectGetProperty(hPens, "Count");
iPaneItem = iPaneItem + 1;
_ObjectCallMethod(hPA, "BlockUpdates");
hPaneItem = _ObjectCallMethod(hPaneItems, "get_Item", iPaneItem);
iPenItem = 0;
FOR iPen = 1 TO nPens DO
hPen = _ObjectCallMethod(hPens, "get_Item", iPen);
IF ObjectIsValid(hPen) THEN
iPenItem = iPenItem + 1;
_ObjectCallMethod(hPen, "GetHorizontalAxisTimeSpan", dtStart, dtStartMs,
dtEnd, dtEndMs, 0);
END