Specifications

3-12 Creating an Extension
3-12
Debug the Extension
To debug the extension, you can set breakpoints on just about
any line in your Visual Basic class. Initially, you should probably
set a breakpoint on the Initialize method. Then, start the
extension (via the Start button or the Start command in the Run
menu).
Next, start HYSYS and create an instance of your extension. This
is done in the same manner as you would create other objects of
the same class. For example, extension Unit Operations can be
created through the UnitOps property view (accessed though
the F12 key).
When you create an instance of your extension, HYSYS creates a
container for it. This container first creates an instance of your
Visual Basic class, and then calls its Initialize method. At this
point, your breakpoint in Visual Basic should be reached. Now
you can inspect variables and step though your code.
You can also use the Debug object in Visual Basic to print
information to the Debug property view while the extension
runs.
Distribute the Extension
Once you are confident that your extension is behaving properly,
you can create an ActiveX DLL file. Create the DLL file by
selecting the appropriate option from Visual Basic’s File menu.
The end result of this step is an extension that you can
distribute without exposing any proprietary information or
methods.
To distribute your extension, you must provide the DLL file, the
EDF file, and any other files required by your extension (i.e., a
separate FORTRAN DLL called from your extension). You must
register your extension on each individual machine that uses the
extension calculations. You can use the registration tool found
on the Extensions tab of the Session Preferences property view
for this, or you can include this step in your own setup program.
For more information on
debugging, please
consult your Visual Basic
manual and help files.