
Automation 2-5
2-5
the application by examining the type library.
The HYSYS type library reveals over 340 objects that contain
over 5000 combined properties and methods. For every object,
the type library shows its associated properties and methods.
For every property, the type library shows its return type. For
every method, the type library shows what type of arguments
are required and what type of value might be returned.
Accessing a specific property or method is accomplished in a
hierarchical fashion by following a chain of exposed objects. The
first object in the chain should be an object from which all other
objects can be accessed. This object is typically the main
application or one of the open documents. In HYSYS, the
starting objects are the SimulationCase and Application objects.
All other objects are accessible through these two starting
objects.
2.2.3 Object Browser
The type library itself does not exist in a form which is
immediately viewable to you. In order to view the type library,
you require the use of an application commonly referred to as
an Object Browser. The Object Browser interprets the type
library and displays the relevant information. Microsoft Excel
and Visual Basic both include a built in Object Browser.
Accessing the Object Browser in
Excel 97/2000/XP
1. Open the Tools menu.
2. Press ALT F11 (or select the Visual Basic Editor option
from Macro group).
3. Within the Visual Basic Editor, open the Tools menu.
4. Select the References command.
5. Select the checkbox next to the HYSYS Type Library.
6. Click the OK button.
Komentáře k této Příručce