Rockwell Automation FactoryTalk Historian Classic User Guide User Manual
Page 146

Chapter 7 Creating RSBizWare Custom Analysis Tools
3. Specify NegativeCalc as the short name of this class. Filling in
the Short Name field will fill in default values for the rest of
the fields on the screen.
4. Click OK to complete the creation of the class. Visual C++
then will create a new empty COM class.
5. To make the class implement the
RSBizWare::IRSBizWareCalculator interface, access the Class
View tab in C++, expand the NegativeC classes folder,
right-click the CNegativeCalc class, and select Implement
Interface from the shortcut menu.
6. You will see a message from Visual C++ warning that it could
not find a type library for the project. Click OK, browse the
displayed list of available type libraries, select
RSBizWareCalculator 1.0 Type Library (1.0), and click OK.
7. When you select the RSBizWareCalculator 1.0 Type Library,
you will be prompted to select the COM interfaces from that
type library that the class will implement. In this case there is
only the IRSBizWareCalculator interface in the type library.
Select it and click OK.
1. Visual C++ adds declarations for the interface into the
header file of the new CNegativeCalc class. It also adds an
empty
Calculate()
function to the class since the class
now implements the IRSBizWareCalculator interface.
You are almost ready to write the
Calculate()
function in C++.
But first you need to understand how Visual C++ deals with
VARIANT data types.
146
Rockwell Automation Publication HIST-UM001K-EN-E-June 2014