Aspen Touch Solutions ATM-123R Series Specifikace Strana 26

  • 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 25
2-12 Automation Syntax
2-12
ActiveDocument property of hyApp.
Object Properties, Methods, &
Hierarchy
The sequence of objects is set through a special dot function.
Properties and methods for an object are also accessed through
the dot function. It is preferable to keep the sequence of objects
to a minimum since each dot function is a call to link between
the client and the server application.
The object hierarchy is an important and fundamental concept
for utilizing Automation. A particular property can only be
accessed by following a specific chain of objects. The chain
always begins with either the Application or SimulationCase
object and ends with the object containing the desired property.
The methods of an object are accessed in the same fashion as
properties by utilizing the dot function. A method for a particular
object is nothing more then a function or sub-routine whose
behaviour is related to the object in some fashion.
Typically the methods of an object require arguments to be
Example 3: Starting a HYSYS case through Automation
Dim hyCase As SimulationCase
Dim hyApp As HYSYS.Application
Set hyApp = CreateObject(“HYSYS.Application”)
hyApp.SimulationCases.Open(“c:\HYSYS\samples\c-2.hsc”)
Set hyCase = hyApp.ActiveDocument
Syntax for setting objects and accessing properties:
Set objectvar = object.[object.object...].object
Variable = object.[object.object...].property
Syntax for accessing methods:
Function Method
returnvalue = object.method([argument1, argument2,...])
Sub-routine Method
object.method argument1, argument2
Zobrazit stránku 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 373 374

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

Žádné komentáře