Visual TD Excel Add-In User Guide
Visual TD Excel Add-In User Guide
MN914006EN, Version 14
MN914006EN, Version 14
EAS-SA QF-MKT-02 Rev.02
Contents
1 Introduction 1
1.1 Related Documentation .........................................................................................1
1.2 Getting Assistance .................................................................................................2
ii ● Contents
EAS-SA QF-MKT-02 Rev.02
Tables
Table 3-1 Connections window controls....................................................................................... 6
Table 3-2 Visual T&D server connection properties .................................................................... 7
Table 3-3 Visual T&D Excel Add-In functions .......................................................................... 11
Table 3-4 Data Point Browser window controls ......................................................................... 13
Table 3-5 Display Options window: Group Settings tab controls............................................... 15
Table 3-6 Select event type window controls ............................................................................. 16
Table 3-7 VssPtProp function arguments ................................................................................... 19
Table 3-8 VssPtList function arguments ..................................................................................... 21
Table 3-9 VssPtCurrVal function arguments .............................................................................. 22
Table 3-10 VssCurrVal function arguments ................................................................................. 24
Table 3-11 VssPtArchVal function arguments ............................................................................. 25
Table 3-12 VssPtCalcVal function arguments .............................................................................. 30
Table 3-13 Bad quality attributes .................................................................................................. 31
Table 3-14 Uncertain quality attributes......................................................................................... 31
Table 3-15 Good quality attributes ............................................................................................... 32
Table 3-16 Additional quality attributes ....................................................................................... 32
Table 3-17 VssAlarmAndEvent function arguments .................................................................... 35
Table 5-1 VssSetTriggerTime VBA function arguments............................................................ 40
Table 5-2 VssGetTriggerTime function arguments .................................................................... 40
Table 5-3 VssIsConnected VBA function arguments ................................................................. 41
Table 5-4 VssIsConnected VBA return values ........................................................................... 42
Table 5-5 VssConnect VBA function arguments ........................................................................ 42
Table 5-6 VssConnect VBA return values .................................................................................. 42
Table 5-7 VssDisconnect VBA function arguments ................................................................... 43
Table 5-8 VssDisconnect VBA return values ............................................................................. 43
1 Introduction
The Visual T&D family of products is specially designed to integrate a large number of diverse
data sources, thereby providing you with unified view of your electrical substation information.
With the Visual T&D Excel Add-In, you can easily:
access the current and historical substation data in a Microsoft® Excel® workbook, either
locally or remotely;
create custom reports from the current and historical substation data;
perform advanced calculations on the substation data, using Visual T&D server calculation
functions as well as the tools provided by Excel;
create report templates, and have reports generated automatically.
Email: [email protected]
Phone: +1.877.834.0009
Toll Free: +1.800.815.2258
Business hours are from 8 a.m. and 5 p.m. CST, Monday to Friday.
2● Chapter 1: Introduction
EAS-SA QF-MKT-02 Rev.02
The Visual T&D Excel Add-In is an add-in specially designed to be under the control of Microsoft
Excel 2003 or a newer version. Therefore, make sure the software is installed before you begin.
The Visual T&D Excel Add-In belongs to the Visual T&D family of products and is available as
an option at installation time. If you are not sure whether you installed the option, launch the
installation process again.
Note: The installation process differs with Microsoft Excel 2007 and other newer
versions based on the Ribbon user interface.
Moreover, the Visual T&D Excel Add-In does not work with the 64-bit version of
Microsoft Excel 2010; you must install the 32-bit version of Excel to use the
AddIn.
At this point, the list of available add-ins should contain the Visual T&D Excel Add-In.
Make sure the add-in is selected.
Click OK, and then close the Add-Ins window.
Click the Office button, and then click Excel Options. (Excel 2007)
OR
Select the File tab, and then click Options. (Excel 2010)
Select the Add-Ins tab.
In the Manage box, select Excel Add-ins, and then click Go.
In the Add-Ins window, click Browse and select the VSSADDIN.XLL file you found above.
At this point, the list of available add-ins should contain the Visual T&D Excel Add-In.
Make sure the add-in is selected.
Click OK to close the Add-Ins window.
The Visual T&D Excel Add-In allows you to include your substation real-time and historical data
in various Excel calculation and report-formatting functions.
In this chapter, you will learn how to set up the Visual T&D server connection. You will then
familiarize yourself with the various data access functions provided by Visual T&D.
Note: Remember that the Visual T&D Excel Add-In and the server program may be
installed on different computers. All functions are available, regardless of whether
the server is installed locally or remotely.
To modify the list of available connections, you will use the Connections window. This window
displays the list of connections that have been configured, as well as their respective connection
statuses.
Control Description
Available Displays the list of connections to Visual T&D servers.
connections
Control Description
Disabled When selected, indicates that the connection is not currently active.
Address Displays the name or IP address of the computer on which the server resides.
Add Displays a window through which you can add a new connection.
Edit Displays a window through which you can modify the properties of the selected
connection.
Property Description
Name Specifies the symbolic name of the connection.
Address Specifies the name or IP address of the computer on which the server resides.
User Name Specifies the name of the user account to be used in establishing a connection to
the server.
Property Description
Remember my If selected, the password is saved for the next time you start Excel.
password
Otherwise, you will have to enter your password every time you start Excel for
the purpose of opening a connection with the Visual T&D server.
Note: If you select this option, remember to update the password when you change it on
the Visual T&D server.
Note: You can use several instances of Excel to simultaneously edit or consult different
documents. Remember that each instance of the application loads into memory,
a copy of the Visual T&D Excel Add-In, which uses its own connections, and that
the server can accept a limited number of connections (4) on a given computer.
To avoid using several connections, you can open all your documents with the
same instance of Excel, using the File menu’s Open command.
3.2.1 Formulas
A formula is an equation that analyzes the data on a worksheet. Formulas perform mathematical
operations such as additions, multiplications or value comparisons. They can refer to cells on the
same worksheet, to cells on other worksheets within the same workbook, or to cells in other
workbooks.
Formulas calculate the values in a specific order. In Excel, a formula always begins with the equal
(=) sign. This sign tells Excel that the characters that follow represent a formula. Next come the
items to be calculated (operands), separated by the calculation operators. Excel calculates the
formula from left to right, based on a specific order for each operator in the formula. You can
modify the order of the operations by using parentheses.
=C2
By default, each time there is a change to the cell referred to in a formula, the dependent cell
changes as well.
If you only use constants in a formula, rather than references to other cells, the result changes only
if you modify the formula (ex. the result of =30+70+110 formula, will always be 210).
Formulas can also refer to cell ranges, or to names or labels representing cells or cell ranges.
3.2.3.1 Arguments
Arguments can be numbers, text, or logical values such as TRUE or FALSE, arrays, error values
such as #N/A, or cell references. The selected argument must result in a valid value. Arguments
can also be constants, formulas or other functions.
3.2.3.2 Structure
The structure of a function begins with the name of the function, followed by a left parenthesis,
followed by the arguments separated by commas, and lastly, by a right parenthesis.
If the function starts a formula, type an equal sign (=) before the name of the function. You can
also use the Insert Function command (see “Entering a Formula Using the Insert Function
Command”, page 9).
3.2.4 Array
An array is used to create unique formulas that generate several results and that act on a group of
arguments spread out across various rows and columns.
Excel supports two types of arrays: formula arrays and constant arrays. A formula array is a
rectangular area of cells that share a common formula. A constant array is a group of constants
that are laid out in a particular manner and that act as an argument in a formula.
Visual T&D functions can all be inserted in a formula array, in order to simultaneously display
several pieces of information for several data points.
Important Notes
You can enter a formula in an array of cells by selecting the cells, typing the formula, and
then pressing Ctrl-Shift-Enter.
With Visual T&D functions, even if you are requesting numerous pieces of information that
will be displayed in an array of cells, you do not need to select the array of cells. Simply enter
the formula in the first cell of the array, and then press Enter. This can be very useful for
those functions where there is no way of knowing how much space will be occupied by the
results.
In the example below, a formula is typed in cell B2, requesting the units and description for
the 3 points listed cells A2 through A4. Once the Enter key is pressed, the results appeared
in the array of cells B2 through C4. If you were to click on any cell within the array, you
would see that the formula was automatically propagated to each of the cells.
With Visual T&D functions, if you need to edit a formula that is repeated in an array of cells,
simply select the first cell in the array and make the required modifications. Then make sure
to press Ctrl-Shift-Enter, or Excel will not allow you to continue.
You can also enter a formula in a range of cells by copying the formula located in another
cell.
In the Insert Function window, select the desired function, and click OK.
The Function Arguments window appears, displaying the function-specific parameters that
must be specified.
Enter the required function arguments, and then click OK.
Function Description
VssPtProp Function used to access data point properties.
VssPtList Function used to display a list of data points that meet a specific property
criterion.
VssPtCurrVal Function used to access the current values (real-time) of the data points.
Note: This function replaces the VssCurrVal function, which is still supported for
backward compatibility purposes.
VssPtArchVal Function used to access the archived values of the data points in the historical
database.
VssPtCalcVal Function used to access the values that are calculated from archived values in the
historical database.
Function Description
VssGetTriggerTime Function used to retrieve the trigger time as set by the last VssSetTriggerTime
VBA function call in a script.
This function is intended to be used in report models for event-triggered report
generation (see page 40).
VssAlarmAndEvent This function is used to retrieve the list of alarms and events.
Each function requires a group of arguments in order to be able to send a request to the server for
data. The arguments define the nature of the data to be displayed, the list of data points for which
the data is to be extracted, and the manner in which the data is to be displayed in the Excel
workbook.
Thus, each function requires 2 categories of arguments, which are the same for all functions:
The list of data point names for which the data is being requested. The list must contain at
least one data point, but cannot exceed 500 data points.
The information to be displayed. This list specifies which information related to the data
(value, timestamp, quality, etc.) is to be displayed, and in what order. Each function has its
own display parameters, in addition to the parameters that are common to all functions.
Each function is described in detail later on in this chapter.
(Function is suspended)
A checkmark is added beside the menu command to indicate that function execution is, in
fact, suspended.
Note: The standard Excel worksheet update procedures do not update the Visual T&D
data. You have to use the commands described below.
Note: Make sure you have a copy of the document before you remove the formulas, as
you will not be able to re-insert the formulas with Excel’s Undo command.
Control Description
Available Displays the list of data points that are available on the selected connection.
connections
Insert top to bottom Inserts the list of Selected points in a column, from top to bottom, starting at
the selected cell in the active workbook. Each data point name is placed in a
cell, based on its order of appearance in the list of selected points.
Insert left to right Inserts the list of Selected points in a row, from left to right, starting at the
selected cell in the active workbook. Each data point name is placed in a cell,
based on its order of appearance in the list of selected points.
Available points Displays the list of all the data points that are available on the selected
connection. Binary data points are displayed in blue and analog data points, in
green.
Filter Filters the Available points by name. All points containing the text entered in
the box will be displayed.
Group Settings Displays the Group Settings tab of the Display Options window, which you
can use to group the points differently so that you can change their order of
appearance in the Available points list.
See “Grouping Data Points”, page 13.
Selected points Contains the list of data points that will be displayed on the worksheet.
If you open one of the folders, the data points will be displayed as follows:
If you repeat the exercise, but ask that Visual T&D group the points together by the ending of their
names, you will obtain a result that looks like this:
If you open one of the folders, the data points will be displayed as follows:
Control Description
Include binary points Specifies whether binary points are to be included in the list of data points to
be grouped together.
Group data points Specifies whether or not the data points are to be grouped together.
If you do not put a checkmark, the remaining boxes will not be available.
with a common Specifies that the data points with the same characters at the beginning of
beginning their names are to be grouped together.
with a common ending Specifies that the data points with the same characters at the end of their
names are to be grouped together.
are delimited by Specifies that all the data point names have the same delimiter and that you
occurrence ... of are interested in the nth occurrence of the delimiter. For example, if the
character ... delimiter is an underscore and the data point names contain 3 underscores
separated by other characters, and you specify occurrence 2, you are referring
to the second underscore within the data point name. Visual T&D will group
together all the data points with identical characters preceding or following
the second underscore, depending on whether you requested that the data
points be grouped together by the common beginning or common ending of
their names.
have a fixed length Specifies that Visual T&D is to search for all data point names with n
of ... characters identical characters. For example, if you specify a value of 7, Visual T&D
will group together all the data point names for which the first or last 7
characters are identical, depending on whether you requested that the data
points be grouped together by the common beginning or common ending of
their names.
Preview This section of the window displays a list of folders that Visual T&D created
based on your grouping criteria. When you open the different folders, you
will note that the binary points are displayed in blue and the analog points, in
green.
Control Description
Available Displays the list of event types that are available on the selected connection.
connections
Insert top to bottom Inserts the list of Selected event types in a column, from top to bottom, starting
at the selected cell in the active workbook. Each event type name is placed in a
cell, based on its order of appearance in the list of selected points.
Insert left to right Inserts the list of Selected event types in a row, from left to right, starting at the
selected cell in the active workbook. Each event type name is placed in a cell,
based on its order of appearance in the list of selected points.
Filter All the names of the different event types that can be selected. If a group is
selected, Visual T&D Events for example, all event types of that group will be
selected.
Argument Description
Data points The list of data point names for which the properties are being requested.
This argument is mandatory.
Source The name of the data source that provides the data point.
ChimeBehavior Indicates the chime behavior for alarms related to the data
point.
Argument Description
IOType The type of input or output.
Note: This property is used either for the Input Type or
Output Type settings, depending on the type of point.
Zone The zone in which the data point is located, per the site
layout.
Analog Specific
Type The type and size of the data point (ex. 16-bit signed).
LowEGU The minimum value the analog data point can attain, in
engineering units.
Argument Description
HighEGU The maximum value the analog data point can attain, in
engineering units.
LowerThreshold The value the analog data point must fall under to trigger
an alarm or event.
UpperThreshold The value the analog data point must exceed to trigger an
alarm or event.
Binary Specific
Output Specific
Connection The name of the connection to which the data points belong.
You can specify the name of the server computer or its IP address.
This argument is optional, unless the requested data points belong to 2 different
connections.
The formula is typed in cell B2 and is automatically propagated to cells C2 and D2, since 3 fields
of information are requested.
The order of the display parameters determines the order in which the information is put into the
cells.
Argument Description
Property The data point property to be used as the list filter criterion.
Supported properties are the same than for the VssPtProp function (see
“VssPtProp: Accessing the Properties of a Data Point”, page 17, for the
complete list of properties and the corresponding descriptions).
This argument is mandatory.
Value The value the specified property must take for a data point to be included in the
displayed list.
This argument is mandatory.
Connection The name of the connection to which the data points belong.
You can specify the name of the server computer or its IP address.
This argument is optional, unless the requested data points belong to 2 different
connections.
3.4.7.1 Example 1: Displaying the Name of Each Data Point that is Recorded
in the Data Log
In the following formula, the VssPtList function is used to display the name of each data point
that is recorded in the data log:
=VssPtList("IsLogged", 1)
The formula is typed in cell A2 and is automatically propagated to the cells under.
Argument Description
Data points The list of data point names for which the current values are being requested.
This argument is mandatory.
Value The engineering value for an analog point, or the state for a
binary point.
Quality The quality of the current value or state of the data point. If the
quality is good, a value of 1 is displayed. If the value is bad or
unsure, a value of 0 is displayed.
Time The timestamp of the current value or state of the data point.
The value is in local time and represents the time of the last
transition received for the data point.
You can specify the parameter twice, in order to display the
date in one cell and the time in another.
Connection The name of the connection to which the data points belong.
You can specify the name of the server computer or its IP address.
This argument is optional, unless the requested data points belong to 2 different
connections.
The formula is typed in cell A2 and it was automatically propagated to cells B2 through F2, since
6 fields of information are requested.
The order of the display parameters determines the order in which the information is put into the
cells.
The Time parameter was entered twice in the formula, in order to put the date and time in 2
consecutive cells. Please note that cells D2 and E2 are formatted, since Excel had generated the
date and time in numerical format.
The formula is typed in cell B2 and it was automatically put into to cells B2 through D4, since 3
fields of information are requested for each of the 3 data points.
Argument Description
Display 0 Equivalent to entering "Value" as an argument.
Argument Description
2 Equivalent to entering "Value, Quality" as arguments.
Argument Description
Data points The list of data point names for which the transitions are being requested.
This argument is mandatory.
If the list contains multiple data points, the data for each point is grouped
together for the display.
Start Time Start time of the period for which the data is being requested.
This argument is mandatory.
End Time End time of the period for which the data is being requested.
This argument is mandatory.
Value The engineering value for an analog point, or the state for a
binary point.
Quality The quality of the current value or state of the data point.
Time The timestamp of the current value or state of the data point.
Argument Description
Bound Specifies whether the data at the beginning and end of the time range is to be
included (1) or excluded (0).
If no data exists at the bounding times, the next data outside of the range is
shown.
This argument is optional and has a default value of 0.
Maximum The maximum number of transitions requested for each data point.
A value of 0 specifies that the maximum number of transitions returned for each
data point is the limit imposed by the server.
This argument is optional and has a default value of 0.
Connection The name of the connection to which the data points belong.
You can specify the name of the server computer or its IP address.
This argument is optional, unless the requested data points belong to 2 different
connections.
The order of the display parameters determines the order in which the information is put into the
cells.
The order of the display parameters determines the order in which the information is put into the
cells.
Argument Description
Data points The list of data point names for which the transitions are being requested.
This argument is mandatory.
Start Time Start time of the period for which the data is being requested.
This argument is mandatory.
End Time End time of the period for which the data is being requested.
This argument is optional.
If you do not specify an end time, the function returns all the available historical
data from the beginning of the period until the maximum number of transitions
is reached.
Argument Description
Time The timestamp of the start of the sampling period.
If you include this parameter in the list, it is always put into the
first column/row of the display.
Average The average value of the data for each sampling interval. The
average is calculated based on the values interpolated at the
beginning and end of each interval.
This calculation is the mean column of the temporary database
used to create Crystal Reports reports.
Average The text associated with the quality of the average data for the
Quality sampling interval.
String
Integral The integral value of the data for each sampling interval.
This calculation is the integ column of the temporary
database used to create Crystal Reports reports.
Integral The text associated with the quality of the integral data for the
Quality sampling interval.
String
Interpolative The text associated with the quality of the interpolative data
Quality for the sampling interval.
String
Argument Description
Maximum The maximum value for each sampling interval.
This calculation is the max column of the temporary database
used to create Crystal Reports reports.
Maximum The text associated with the quality of the maximum good raw
Quality data for the sampling interval.
String
Maximum The time of the data item that has the maximum value for each
Actual Time sampling interval.
This calculation is the tMax column of the temporary database
used to create Crystal Reports reports.
Maximum The text associated with the quality of the time of the data that
Actual Time has the maximum value for the sampling interval.
Quality
String
Maximum The milliseconds of the time of the data item that has the
Actual Time maximum value for each sampling interval.
Ms
Minimum The text associated with the quality of the minimum good raw
Quality data for the sampling interval.
String
Minimum The time of the data item that has the minimum value for each
Actual Time sampling interval.
This calculation is the tMin column of the temporary database
used to create Crystal Reports reports.
Argument Description
Minimum The numeric representation of the quality of the time of the
Actual Time data that has the minimum value for the sampling interval.
Quality
For additional information about quality values, see
“Displayed Quality Values”, page 31.
Minimum The text associated with the quality of the time of the data that
Actual Time has the minimum value for the sampling interval.
Quality
String
Minimum The milliseconds of the time of the data item that has the
Actual Time minimum value for each sampling interval.
Ms
Standard The standard deviation for all the data included in each
Deviation sampling interval.
This calculation is the std column of the temporary database
used to create Crystal Reports reports.
Standard The text associated with the quality of the standard deviation
Deviation data for the sampling interval.
Quality
String
Sum of The sum of the decrements for all the data included in each
decrements sampling interval.
This calculation is the decr column of the temporary database
used to create Crystal Reports reports.
Sum of The text associated with the quality of the sum of decrements
decrements for all the data for the sampling interval.
Quality
String
Sum of The sum of the increments for all the data included in each
increments sampling interval.
This calculation is the incr column of the temporary database
used to create Crystal Reports reports.
Argument Description
Sum of The text associated with the quality of the sum of increments
increments for all the data for the sampling interval.
Quality
String
Transitions The number of transitions that occurred on this point for the
Quantity specified period.
Variance The text associated with the quality of the variance for the
Quality sampling interval.
String
End Quality The text associated with the quality of the last value for the
String sampling interval.
Connection The name of the connection to which the data points belong.
You can specify the name of the server computer or its IP address.
This argument is optional, unless the requested data points belong to 2 different
connections.
Note: Quality values are expressed as decimal numbers in Excel. However, working
with hexadecimal numbers makes it easier to decode the quality attributes that
compose the value.
The following tables presents the quality attributes that can appear in a quality value:
0x00000058 Subnormal
0x00020000 Interpolated
0x00040000 Raw
0x00080000 Calculated
0x00100000 No Bound
0x00200000 No Data
0x00800000 Conversion
0x01000000 Partial
Argument Description
Start Time Start time of the period for which the data is being requested.
This argument is mandatory.
End Time End time of the period for which the data is being requested.
This argument is mandatory.
Value The engineering value for an analog point, or the state for a
binary point.
Time The timestamp of the current value or state of the data point.
Note The note associated to the event or the point of the event.
Alarms only Indicates if only alarms (1) are returned or if all events are (0).
This flag is effective only for event of the Process-related events type.
This argument is optional and has a default value of 0.
All event types Indicates if all events types must be included (1) or only those specified (0).
This argument is optional and has a default value of 0.
All data points Indicates if all data points (1) are returned or only those specified (0).
Argument Description
This argument is optional and has a default value of 0.
Data points List of the data points to be considered in the request. Events not related to a
point will ignore this argument.
This argument is not considered if All data points is set to 1.
Otherwise, this argument is mandatory.
Connection The name of the connection to which the request will be sent.
You can specify the name of the server computer or its IP address.
This argument is optional, unless the application is connected to 2 or more
server.
3.4.11.1 Example: Displaying the First 5 Events that Occurred at a Given Date
In the following formula, the VssAlarmAndEvent function is used to display the 5 first events
that occurred at a given date:
The order of the display parameters determines the order in which the information is put into the
cells.
Microsoft Excel allows you to create report templates that you can use to generate periodic
reports, without altering the template. Report templates are stored in files with an XLTX (or XLT)
extension.
The Visual T&D Excel Add-In provides additional functions to help you create your report
models.
Excel will ask you to assign a name to the workbook (you cannot modify the model this way).
From the Visual T&D menu, choose Remove All Formulas, and save the document again.
This will ensure that when someone subsequently opens the file, the report data will remain as
it was when you saved it, rather than being updated with new information from the server.
5 Automating Report
Generation
You can easily automate the generation of your reports, based on the templates you create.
Reports can be generated on a periodic basis, or when a specific event occurs. In both cases, a
Visual Basic for Applications (VBA) script must be used specifically for the generation. The
difference between both methods is how and when the script will be executed.
The periodic execution of a script can be planned using Windows’ scheduled tasks or Visual T&D
Explorer’s Task Manager. Event-triggered report generation should be automated using
Visual T&D Explorer’s Task Manager.
The most interesting feature of event-triggered report generation is the possibility to use the trigger
time to specify the range of data to include in the report. For example, an operator may be
interested to know the sequence of events that occurred 15 minutes prior to a breaker trip event,
and 5 minutes after. This is feasible using event-triggered report generation.
This chapter outlines the steps required to automate the generation of a report.
Note: This is a Visual T&D-specific VBA function. It is not available in Excel, but it can
be used in scripts.
The VssSetTriggerTime function is used to set the trigger date and time in a script prior to
calls to the VssGetTriggerTime function. Your script should take the trigger time as an
argument, or should know how to retrieve the trigger time by itself.
The VssSetTriggerTime function has the following arguments:
Argument Description
Trigger Time The date and time at which the event triggered the report generation.
This argument is mandatory.
Is Local Indicates if the trigger time should be interpreted by Excel as UTC time (0) or
local time (1).
This argument is mandatory.
Argument Description
Display The display parameters, including the information to be displayed.
This argument is optional.
The following parameters are supported in the current version:
Date and Get the trigger date and time as set by VssSetTriggerTime.
Time
Milliseconds must be obtained via a second call, using the Ms
argument (see below).
5.1.1.3 Example
In a report model, to display L226.AA point transitions that were recorded 3 hours (0.125 of a
day) prior to the event, you should type the following formula in a cell:
As requested, the timestamp, value and quality of each transition are displayed in separate
columns. Please note that column A is formatted since Excel generates the date and time in
numerical format.
Note: This is a Visual T&D-specific VBA function. It is not available in Excel, but it can
be used in scripts.
The VssIsConnected function is used to verify if a connection between the Visual T&D Excel
Add-In and the Visual T&D server is currently active, or not, through script execution.
The VssIsConnected function has the following arguments and return values:
Argument Description
Name The name of the connection, as specified in the Excel Add-In Connections
window.
This argument is mandatory.
Note: This is a Visual T&D-specific VBA function. It is not available in Excel, but it can
be used in scripts.
The VssConnect function is used to establish a connection between the Visual T&D Excel
Add-In and the Visual T&D server through script execution, even if this connection is deactivated
in the Visual T&D Excel Add-In.
The VssConnect function has the following arguments and return values:
Argument Description
Name The name of the connection, as specified in the Excel Add-In Connections
window.
This argument is mandatory.
-3 The connection could not be established because the maximum number of users
allowed by the Visual T&D license was reached.
-4 The connection could not be established because the server cannot be reached.
-5 The connection could not be established before the expiration of the connection
timer.
-7 The connection could not be established because the current license of the
Visual T&D server to connect is not valid.
Note: This is a Visual T&D-specific VBA function. It is not available in Excel, but it can
be used in scripts.
The VssDisconnect function is used to terminate a connection between the Visual T&D Excel
Add-In and the Visual T&D server through script execution.
The VssDisconnect function has the following arguments and return values:
Argument Description
Name The name of the connection, as specified in the Excel Add-In Connections
window.
This argument is mandatory.
Note: The script shown adds the date and time of the report generation to the output
file name, in order to avoid overwriting the same file each time the report is
generated.
wscript <script name> <template name> <destination path> <output file name>
Example:
Note: If you experience any problems with script files, feel free to contact our technical
support (see page 2). However, the script should work if you follow the preceding
instructions carefully.
In the General tab, type a Name for the task to schedule and enter a short Description for it.
Under Security Options:
Select Run whether user is logged or not.
By default, the user account that creates the task is assigned to it; you can change the
account using the Change User or Group button.
Select the Triggers tab, and then click New.
Specify when the task should be executed, and then click OK.
Select the Actions tab, and then click New.
Under Settings:
Click Browse, and locate wscript.exe, which normally resides in the
.\WINDOWS\system32\ folder of your hard disk; click Open once the file is
selected.
In the Add arguments (optional) box, type the following arguments:
For example, you can stop the task if it runs longer than a certain time.
Click OK.
The task appears in the Task Scheduler list and should now be performed as scheduled.
For example, a user may want to automate the generation of a report when a breaker opens. The
report would contain all transitions and the sequence of events prior, and after, the breaker event.
This is made possible using the Task Manager, by creating a task that executes a report-
generation VBA script. This task must then be configured to be triggered by the breaker’s opening
event.
Task management is explained more in details in the Visual T&D Explorer User Manual.
This chapter presents a few tricks and tips to make it easier for you to use the Visual T&D Excel
Add-In, and to create reports and templates.