Aspen Touch Solutions ATM-123R Series Specifikace Strana 27

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 374
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 26
Automation 2-13
2-13
passed when the method is called. The type library provides
information about which arguments are necessary to call a
particular method. A function returns a value.
The example below, starts up HYSYS and opens a specific case.
The temperature value of a specific stream is then obtained. The
temperature value is obtained through a connection of three
objects: SimulationCase, Flowsheet, and MaterialStreams.
The example below, also accesses the temperature value of a
specific stream but creates some intermediate objects so that
when the temperature value is actually requested the chain of
objects only contains one object.
Collection Objects
A collection object is an object that contains a set of other
objects. This is similar to an array of objects. The difference
between an array of objects and a collection object is that a
Sub-routines in Visual Basic do not require parentheses
around the argument list.
Example 1: Accessing HYSYS object properties
Dim hyCase As SimulationCase
Dim TempVal As Double
Set hyCase = GetObject(“c:\c-2.hsc”,”HYSYS.SimulationCase”)
TempVal = hyCase.Flowsheet.MaterialStreams.Item(0).TemperatureValue
MsgBox TempVal
Example 2: Accessing HYSYS object properties
Dim hyCase As SimulationCase
Dim hyFlowsheet As Flowsheet
Dim hyStream As ProcessStream
Dim TempVal As Double
Set hyCase = GetObject(“c:\samples\c-2.hsc”, “HYSYS.SimulationCase”)
Set hyFlowsheet = hyCase.Flowsheet
Set hyStream = hyCase.Flowsheet.MaterialStreams.Item(0)
TempVal = hyStream.TemperatureValue
MsgBox TempVal
Zobrazit stránku 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 ... 373 374

Komentáře k této Příručce

Žádné komentáře